- Timestamp:
- Oct 5, 2009 1:56:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/linux/HostHardwareLinux.cpp
r23522 r23563 45 45 # include <sys/stat.h> 46 46 # include <unistd.h> 47 # include <sys/ioctl.h>48 47 # include <fcntl.h> 49 # include <mntent.h>50 48 /* bird: This is a hack to work around conflicts between these linux kernel headers 51 49 * and the GLIBC tcpip headers. They have different declarations of the 4 … … 146 144 147 145 146 /** 147 * Get the name of a floppy drive according to the Linux floppy driver. 148 * @returns true on success, false if the name was not available (i.e. the 149 * device was not readible, or the file name wasn't a PC floppy 150 * device) 151 * @param pcszNode the path to the device node for the device 152 * @param Number the Linux floppy driver number for the drive. Required. 153 * @param pszName where to store the name retreived 154 */ 148 155 static bool floppyGetName(const char *pcszNode, unsigned Number, 149 156 floppy_drive_name pszName) … … 226 233 227 234 235 /** 236 * Check whether a device number might correspond to a CD-ROM device according 237 * to Documentation/devices.txt in the Linux kernel source. 238 * @returns true if it might, false otherwise 239 * @param Number the device number (major and minor combination) 240 */ 228 241 static bool isCdromDevNum(dev_t Number) 229 242 { … … 947 960 * find and can access to our list. (If we can't access them we can't check 948 961 * whether or not they are really DVD or floppy drives). 962 * @note this is rather slow (a couple of seconds) for DVD probing on 963 * systems with a static /dev tree, as the current code tries to open 964 * any device node with a major/minor combination that could belong to 965 * a CD-ROM device, and opening a non-existent device can take a non. 966 * negligeable time on Linux. If it is ever necessary to improve this 967 * (static /dev trees are no longer very fashionable these days, and 968 * sysfs looks like it will be with us for a while), we could further 969 * reduce the number of device nodes we open by checking whether the 970 * driver is actually loaded in /proc/devices, and by counting the 971 * of currently attached SCSI CD-ROM devices in /proc/scsi/scsi (yes, 972 * there is a race, but it is probably not important for us). 949 973 * @returns iprt status code 950 974 * @param pList the list to append the drives found to
Note:
See TracChangeset
for help on using the changeset viewer.