VirtualBox

Changeset 23563 in vbox for trunk


Ignore:
Timestamp:
Oct 5, 2009 1:56:34 PM (15 years ago)
Author:
vboxsync
Message:

Main/HostHardwareLinux: function descriptions and removed a header file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/linux/HostHardwareLinux.cpp

    r23522 r23563  
    4545# include <sys/stat.h>
    4646# include <unistd.h>
    47 # include <sys/ioctl.h>
    4847# include <fcntl.h>
    49 # include <mntent.h>
    5048/* bird: This is a hack to work around conflicts between these linux kernel headers
    5149 *       and the GLIBC tcpip headers. They have different declarations of the 4
     
    146144
    147145
     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 */
    148155static bool floppyGetName(const char *pcszNode, unsigned Number,
    149156                          floppy_drive_name pszName)
     
    226233
    227234
     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 */
    228241static bool isCdromDevNum(dev_t Number)
    229242{
     
    947960 * find and can access to our list.  (If we can't access them we can't check
    948961 * 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).
    949973 * @returns iprt status code
    950974 * @param   pList      the list to append the drives found to
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette