Changeset 23382 in vbox
- Timestamp:
- Sep 28, 2009 2:04:05 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 52907
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/linux/HostHardwareLinux.cpp
r23310 r23382 53 53 # define _LINUX_BYTEORDER_SWABB_H 54 54 # include <linux/cdrom.h> 55 # include <linux/fd.h> 55 56 # ifdef VBOX_WITH_DBUS 56 57 # include <vbox-dbus.h> … … 1304 1305 void validateAndInitForFloppy() 1305 1306 { 1306 char szBus[128]; 1307 floppy_drive_name szName; 1308 int rcIoCtl; 1307 1309 if ( mpcszName[0] != 'f' 1308 1310 || mpcszName[1] != 'd' … … 1311 1313 || mpcszName[3] != '\0') 1312 1314 return; 1313 ssize_t cchBus = RTLinuxSysFsGetLinkDest(szBus, sizeof(szBus), 1314 "block/%s/device/bus", 1315 mpcszName); 1316 if (cchBus < 0) 1317 return; 1318 if (strcmp(szBus, "platform") != 0) 1315 RTFILE file; 1316 int rc = RTFileOpen(&file, mszNode, RTFILE_O_READ); 1317 /** @note the next line can produce a warning, as the ioctl request 1318 * field is defined as signed, but the Linux ioctl definition macros 1319 * produce unsigned constants. */ 1320 rc = RTFileIoCtl(file, FDGETDRVTYP, szName, 0, &rcIoCtl); 1321 RTFileClose(file); 1322 if (rcIoCtl < 0) 1319 1323 return; 1320 1324 misValid = true;
Note:
See TracChangeset
for help on using the changeset viewer.