Changeset 8835 in vbox for trunk/src/VBox
- Timestamp:
- May 15, 2008 9:18:29 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r8812 r8835 53 53 #include <windows.h> 54 54 #include <winioctl.h> 55 #elif defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 55 #elif defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 56 56 #include <errno.h> 57 57 #include <sys/ioctl.h> … … 69 69 #include <sys/disk.h> 70 70 #endif /* RT_OS_DARWIN */ 71 #ifdef RT_OS_SOLARIS 72 #include <stropts.h> 73 #include <sys/dkio.h> 74 #include <sys/vtoc.h> 75 #endif /* RT_OS_SOLARIS */ 71 76 72 77 using namespace com; … … 831 836 else 832 837 { 833 RTPrintf("File '%s' is no disk\n", rawdisk.raw());838 RTPrintf("File '%s' is no block device\n", rawdisk.raw()); 834 839 return VERR_INVALID_PARAMETER; 835 840 } … … 852 857 else 853 858 { 854 RTPrintf("File '%s' is no disk\n", rawdisk.raw()); 859 RTPrintf("File '%s' is no block device\n", rawdisk.raw()); 860 return VERR_INVALID_PARAMETER; 861 } 862 #elif defined(RT_OS_SOLARIS) 863 struct stat DevStat; 864 if (!fstat(RawFile, &DevStat) && S_ISBLK(DevStat.st_mode)) 865 { 866 struct dk_minfo mediainfo; 867 if (!ioctl(RawFile, DKIOCGMEDIAINFO, &mediainfo)) 868 cbSize = mediainfo.dki_capacity * mediainfo.dki_lbsize; 869 else 870 return RTErrConvertFromErrno(errno); 871 } 872 else 873 { 874 RTPrintf("File '%s' is no block device\n", rawdisk.raw()); 855 875 return VERR_INVALID_PARAMETER; 856 876 }
Note:
See TracChangeset
for help on using the changeset viewer.