DCMD_FSYS_STATVFS
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Get filesystem information
Synopsis:
#include <sys/dcmd_blk.h>
#define DCMD_FSYS_STATVFS __DIOF(_DCMD_FSYS, 13, struct __msg_statvfs)
Arguments to devctl():
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. |
dcmd | DCMD_FSYS_STATVFS |
dev_data_ptr | A pointer to a struct __msg_statvfs |
n_bytes | sizeof(struct __msg_statvfs) |
dev_info_ptr | NULL |
Description:
This command gets information about the filesystem associated with the file descriptor passed to devctl().
Input:
None.
Output:
A filled-in __msg_statvfs structure.
For compatibility between 32- and 64-bit programs, the DCMD_FSYS_STATVFS command uses a __msg_statvfs structure instead of a statvfs structure. The __msg_statvfs structure is equivalent to the 32-bit version of statvfs. The <sys/statvfs.h> header file declares some functions and macros that you can use to convert one structure into the other:
/* Conversion methods from/to __msg_statvfs and statvfs */
extern void __msg_statvfs_init64(struct __msg_statvfs * _msg, const struct statvfs64 * _statvfsp);
extern void __msg_statvfs_copy64(struct statvfs64 * _statvfsp, const struct __msg_statvfs * _msg);
/* Alias methods, casting to statvfs64 simplifies handling the fsblkcnt_t high and low bytes */
#define __msg_statvfs_init(_msg, _statvfsp) (__msg_statvfs_init64((_msg), (const struct statvfs64 *)(_statvfsp)))
#define __msg_statvfs_copy(_statvfsp, _msg) (__msg_statvfs_copy64((struct statvfs64 *)(_statvfsp), (_msg)))
For a description of the statvfs structure, see statvfs() in the C Library Reference.
See also:
devctl(), fstatvfs() statvfs() in the QNX OS C Library Reference
Page updated: