VirtualBox

Changeset 36958 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
May 4, 2011 2:50:32 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71554
Message:

Main/linux/USB: better permissions checking and code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/USBGetDevices.h

    r34341 r36958  
    7575RT_C_DECLS_BEGIN
    7676
    77 /** List of well-known USB device tree locations */
    78 typedef struct USBDEVTREELOCATION
    79 {
    80     /** The root of the device tree for this location. */
    81     char szDevicesRoot[256];
    82     /** Whether this location requires device enumeration using sysfs. */
    83     bool fUseSysfs;
    84 } USBDEVTREELOCATION, *PUSBDEVTREELOCATION;
    85 typedef const USBDEVTREELOCATION *PCUSBDEVTREELOCATION;
    86 
    8777/**
    88  * Get the USB device tree root
    89  * @param  fPreferSysfs  whether we wish to use sysfs over usbfs for
    90  *                       enumeration if we have the choice
    91  * @note   returns a pointer into a static array so it will stay valid
     78 * Check whether a USB device tree root is usable
     79 * @param pcszRoot        the path to the root of the device tree
     80 * @param fIsDeviceNodes  whether this is a device node (or usbfs) tree
     81 * @note  returns a pointer into a static array so it will stay valid
    9282 */
    93 extern PCUSBDEVTREELOCATION USBProxyLinuxGetDeviceRoot(bool fPreferSysfs);
     83extern bool USBProxyLinuxCheckDeviceRoot(const char *pcszRoot,
     84                                         bool fIsDeviceNodes);
    9485
    9586/**
     
    9788 * @a deviceFree or something equivalent.
    9889 * @param pcszDevicesRoot  the path to the root of the device tree
    99  * @param fUseSysfs       whether to use sysfs (or usbfs) for enumeration
     90 * @param fUseSysfs        whether to use sysfs (or usbfs) for enumeration
    10091 */
    10192extern PUSBDEVICE USBProxyLinuxGetDevices(const char *pcszDevicesRoot,
Note: See TracChangeset for help on using the changeset viewer.

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