- Timestamp:
- Aug 3, 2010 10:17:03 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostImpl.cpp
r31345 r31346 2035 2035 di_devfs_path_free(pszMinorPath); 2036 2036 2037 char *pszSlice = solarisGetSliceFromPath(pszDevLinkPath); 2038 if ( pszSlice && !strcmp(pszSlice, "s2") 2039 && !strncmp(pszDevLinkPath, "/dev/rdsk", sizeof("/dev/rdsk") - 1)) /* We want only raw disks */ 2037 if (pszDevLinkPath) 2040 2038 { 2041 /* 2042 * We've got a fully qualified DVD drive. Add it to the list. 2043 */ 2044 PSOLARISDVD pDrive = (PSOLARISDVD)RTMemAllocZ(sizeof(SOLARISDVD)); 2045 if (RT_LIKELY(pDrive)) 2039 char *pszSlice = solarisGetSliceFromPath(pszDevLinkPath); 2040 if ( pszSlice && !strcmp(pszSlice, "s2") 2041 && !strncmp(pszDevLinkPath, "/dev/rdsk", sizeof("/dev/rdsk") - 1)) /* We want only raw disks */ 2046 2042 { 2047 RTStrPrintf(pDrive->szDescription, sizeof(pDrive->szDescription), "%s %s", pszVendor, pszProduct); 2048 RTStrCopy(pDrive->szRawDiskPath, sizeof(pDrive->szRawDiskPath), pszDevLinkPath); 2049 if (*ppDrives) 2050 pDrive->pNext = *ppDrives; 2051 *ppDrives = pDrive; 2043 /* 2044 * We've got a fully qualified DVD drive. Add it to the list. 2045 */ 2046 PSOLARISDVD pDrive = (PSOLARISDVD)RTMemAllocZ(sizeof(SOLARISDVD)); 2047 if (RT_LIKELY(pDrive)) 2048 { 2049 RTStrPrintf(pDrive->szDescription, sizeof(pDrive->szDescription), "%s %s", pszVendor, pszProduct); 2050 RTStrCopy(pDrive->szRawDiskPath, sizeof(pDrive->szRawDiskPath), pszDevLinkPath); 2051 if (*ppDrives) 2052 pDrive->pNext = *ppDrives; 2053 *ppDrives = pDrive; 2054 } 2052 2055 } 2056 free(pszDevLinkPath); 2053 2057 } 2054 free(pszDevLinkPath);2055 2058 } 2056 2059 }
Note:
See TracChangeset
for help on using the changeset viewer.