VirtualBox

Changeset 15644 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Dec 18, 2008 11:16:58 AM (16 years ago)
Author:
vboxsync
Message:

IPRT: sysfs review, fixes and cleanup.

File:
1 edited

Legend:

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

    r15399 r15644  
    3434#include <iprt/cdefs.h>
    3535#include <iprt/types.h>
     36#include <iprt/stdarg.h>
    3637
    37 #include <stdarg.h>
    3838
    3939__BEGIN_DECLS
     
    8383 * Closes a file opened with RTLinuxSysFsOpen or RTLinuxSysFsOpenV.
    8484 *
    85  * @param   fd
     85 * @param   fd          File descriptor returned by RTLinuxSysFsOpen or
     86 *                      RTLinuxSysFsOpenV.
    8687 */
    8788RTDECL(void) RTLinuxSysFsClose(int fd);
     
    145146/**
    146147 * Reads the last element of the path of the file pointed to by the symbolic
    147  * link specified.  This is needed at least to get the name of the driver
    148  * associated with a device, where pszFormat should be the "driver" link in the
    149  * devices sysfs directory.
     148 * link specified.
     149 *
     150 * This is needed at least to get the name of the driver associated with a
     151 * device, where pszFormat should be the "driver" link in the devices sysfs
     152 * directory.
     153 *
     154 * @returns The number of characters written on success, -1 and errno on failure.
     155 * @param   pszBuf      Where to store the path element.  Must be at least two
     156 *                      characters, but a longer buffer would be advisable.
     157 * @param   cchBuf      The size of the buffer pointed to by @a pszBuf.
     158 * @param   pszFormat   The filename format, either absolute or relative to "/sys/".
     159 * @param   va           Format args.
     160 */
     161RTDECL(ssize_t) RTLinuxSysFsGetLinkDestV(char *pszBuf, size_t cchBuf, const char *pszFormat, va_list va);
     162
     163/**
     164 * Reads the last element of the path of the file pointed to by the symbolic
     165 * link specified.
     166 *
     167 * This is needed at least to get the name of the driver associated with a
     168 * device, where pszFormat should be the "driver" link in the devices sysfs
     169 * directory.
    150170 *
    151171 * @returns The number of characters written on success, -1 and errno on failure.
     
    156176 * @param   ...         Format args.
    157177 */
    158 RTDECL(int) RTLinuxSysFsGetLinkDest(char *pszBuf, size_t cchBuf, const char *pszFormat, ...);
     178RTDECL(ssize_t) RTLinuxSysFsGetLinkDest(char *pszBuf, size_t cchBuf, const char *pszFormat, ...);
    159179
    160180/** @} */
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