VirtualBox

Changeset 50783 in vbox for trunk/include/iprt/linux


Ignore:
Timestamp:
Mar 14, 2014 9:57:47 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92804
Message:

Main and Runtime/Linux: rip out all code for recursively walking /dev, as it is not needed on modern Linux systems and partly visibly broken.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/linux/sysfs.h

    r44529 r50783  
    208208
    209209/**
    210  * Find the path of a device node under /dev, given then device number.
    211  *
    212  * This function will recursively search under /dev until it finds a device node
    213  * matching @a devnum, and store the path into @a pszBuf.  The caller may
    214  * provide an expected path in pszSuggestion, which will be tried before
    215  * searching, but due to the variance in Linux systems it can be hard to always
    216  * correctly predict the path.
     210 * Check the path of a device node under /dev, given the device number and a
     211 * pattern and store the path into @a pszBuf.
    217212 *
    218213 * @returns The length of the returned string on success, -1 and errno on
     
    224219 * @param   pszBuf         Where to store the path.
    225220 * @param   cchBuf         The size of the buffer.
    226  * @param   pszSuggestion  The expected path format of the device node, either
    227  *                         absolute or relative to "/dev". (Optional)
     221 * @param   pszPattern     The expected path format of the device node, either
     222 *                         absolute or relative to "/dev".
    228223 * @param   va             Format args.
    229224 */
    230 RTDECL(ssize_t) RTLinuxFindDevicePathV(dev_t DevNum, RTFMODE fMode, char *pszBuf, size_t cchBuf,
    231                                        const char *pszSuggestion, va_list va);
    232 
    233 /**
    234  * Find the path of a device node under /dev, given the device number.
    235  *
    236  * This function will recursively search under /dev until it finds a device node
    237  * matching @a devnum, and store the path into @a pszBuf.  The caller may
    238  * provide an expected path in pszSuggestion, which will be tried before
    239  * searching, but due to the variance in Linux systems it can be hard to always
    240  * correctly predict the path.
     225RTDECL(ssize_t) RTLinuxCheckDevicePathV(dev_t DevNum, RTFMODE fMode,
     226                                        char *pszBuf, size_t cchBuf,
     227                                        const char *pszPattern, va_list va);
     228
     229/**
     230 * Check the path of a device node under /dev, given the device number and a
     231 * pattern and store the path into @a pszBuf.
    241232 *
    242233 * @returns The length of the returned string on success, -1 and errno on
     
    248239 * @param   pszBuf          Where to store the path.
    249240 * @param   cchBuf          The size of the buffer.
    250  * @param   pszSuggestion   The expected path format of the device node, either
    251  *                          absolute or relative to "/dev". (Optional)
     241 * @param   pszPattern      The expected path format of the device node, either
     242 *                          absolute or relative to "/dev".
    252243 * @param   ...             Format args.
    253244 */
    254 RTDECL(ssize_t) RTLinuxFindDevicePath(dev_t DevNum, RTFMODE fMode, char *pszBuf, size_t cchBuf,
    255                                       const char *pszSuggestion, ...);
     245RTDECL(ssize_t) RTLinuxCheckDevicePath(dev_t DevNum, RTFMODE fMode,
     246                                       char *pszBuf, size_t cchBuf,
     247                                       const char *pszPattern, ...);
    256248
    257249/** @} */
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