Changeset 23332 in vbox for trunk/include/iprt
- Timestamp:
- Sep 25, 2009 1:26:57 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 52844
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/linux/sysfs.h
r23309 r23332 36 36 #include <iprt/stdarg.h> 37 37 38 #include <sys/types.h> 38 #include <sys/types.h> /* for dev_t */ 39 39 40 40 RT_C_DECLS_BEGIN … … 171 171 * directory. 172 172 * 173 * @returns The number of characters written on success, -1 and errno on failure. 173 * @returns The length of the returned string on success, -1 and errno on 174 * failure. 174 175 * @param pszBuf Where to store the path element. Must be at least two 175 176 * characters, but a longer buffer would be advisable. … … 188 189 * directory. 189 190 * 190 * @returns The number of characters written on success, -1 and errno on failure. 191 * @returns The length of the returned string on success, -1 and errno on 192 * failure. 191 193 * @param pszBuf Where to store the path element. Must be at least two 192 194 * characters, but a longer buffer would be advisable. … … 198 200 199 201 /** 200 * Find the path of a device node under /dev, given then device number. This 201 * function will recursively search under /dev until it finds a device node 202 * Find the path of a device node under /dev, given then device number. 203 * 204 * This function will recursively search under /dev until it finds a device node 202 205 * matching @a devnum, and store the path into @a pszBuf. The caller may 203 206 * provide an expected path in pszSuggestion, which will be tried before 204 207 * searching, but due to the variance in Linux systems it can be hard to always 205 208 * correctly predict the path. 206 * 207 * @returns the number of characters written on success, -1 and errno on 208 * failure 209 * @returns -1 and ENOENT if no matching device node could be found 210 * @param devNum the device number to search for 211 * @param fMode the type of device - only RTFS_TYPE_DEV_CHAR 212 * and RTFS_TYPE_DEV_BLOCK are valid values 213 * @param pszBuf where to store the path 214 * @param cchBuf the size of the buffer 215 * @param pszSuggestion the expected path format of the device node, either 216 * absolute or relative to "/dev" (optional) 217 * @param va Format args. 218 */ 219 RTDECL(ssize_t) RTLinuxFindDevicePathV(dev_t devNum, RTFMODE fMode, char *pszBuf, size_t cchBuf, const char *pszSuggestion, va_list va); 220 221 /** 222 * Find the path of a device node under /dev, given then device number. This 223 * function will recursively search under /dev until it finds a device node 209 * 210 * @returns The length of the returned string on success, -1 and errno on 211 * failure. 212 * @returns -1 and ENOENT if no matching device node could be found. 213 * @param DevNum The device number to search for. 214 * @param fMode The type of device - only RTFS_TYPE_DEV_CHAR and 215 * RTFS_TYPE_DEV_BLOCK are valid values. 216 * @param pszBuf Where to store the path. 217 * @param cchBuf The size of the buffer. 218 * @param pszSuggestion The expected path format of the device node, either 219 * absolute or relative to "/dev". (Optional) 220 * @param va Format args. 221 */ 222 RTDECL(ssize_t) RTLinuxFindDevicePathV(dev_t DevNum, RTFMODE fMode, char *pszBuf, size_t cchBuf, 223 const char *pszSuggestion, va_list va); 224 225 /** 226 * Find the path of a device node under /dev, given the device number. 227 * 228 * This function will recursively search under /dev until it finds a device node 224 229 * matching @a devnum, and store the path into @a pszBuf. The caller may 225 230 * provide an expected path in pszSuggestion, which will be tried before 226 231 * searching, but due to the variance in Linux systems it can be hard to always 227 232 * correctly predict the path. 228 * 229 * @returns the number of characters written on success, -1 and errno on 230 * failure 231 * @returns -1 and ENOENT if no matching device node could be found 232 * @param devNum the device number to search for 233 * @param fMode the type of device - only RTFS_TYPE_DEV_CHAR 234 * and RTFS_TYPE_DEV_BLOCK are valid values 235 * @param pszBuf where to store the path 236 * @param cchBuf the size of the buffer 237 * @param pszSuggestion the expected path format of the device node, either 238 * absolute or relative to "/dev" (optional) 239 * @param ... Format args. 240 */ 241 RTDECL(ssize_t) RTLinuxFindDevicePath(dev_t devNum, RTFMODE fMode, char *pszBuf, size_t cchBuf, const char *pszSuggestion, ...); 233 * 234 * @returns The length of the returned string on success, -1 and errno on 235 * failure. 236 * @returns -1 and ENOENT if no matching device node could be found. 237 * @param DevNum The device number to search for 238 * @param fMode The type of device - only RTFS_TYPE_DEV_CHAR and 239 * RTFS_TYPE_DEV_BLOCK are valid values 240 * @param pszBuf Where to store the path. 241 * @param cchBuf The size of the buffer. 242 * @param pszSuggestion The expected path format of the device node, either 243 * absolute or relative to "/dev". (Optional) 244 * @param ... Format args. 245 */ 246 RTDECL(ssize_t) RTLinuxFindDevicePath(dev_t DevNum, RTFMODE fMode, char *pszBuf, size_t cchBuf, 247 const char *pszSuggestion, ...); 242 248 243 249 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.