|HP-UX Reference > S
HP-UX 11i Version 3: February 2007
statfsdev(), fstatfsdev() — get file system statistics
int statfsdev(const char *path, struct statfs *buf);
int fstatfsdev(int fildes, struct statfs *buf);
statfsdev() returns information about the file system contained in the file specified by path.
buf is a pointer to a statfs structure into which information is placed concerning the file system. The contents of the structure pointed to by buf include the following members:
int32_t f_bavail /* free blocks available to non-superuser */ int32_t f_bfree /* free blocks */ int32_t f_blocks /* total blocks in file system */ int32_t f_bsize /* fundamental file system block size in bytes */ int32_t f_ffree /* free file nodes in file system */ int32_t f_files /* total file nodes in file system */ int32_t f_type /* type of info, zero for now */ fsid_t f_fsid /* file system ID. f_fsid is MOUNT_UFS, MOUNT_NFS, or MOUNT_CDFS */
The fields f_blocks, f_bavail, and f_bfree are expressed in terms of blocks of size f_bsize.
Fields that are undefined for a particular file system are set to -1 .
fstatfsdev() returns the same information as above, but about the open file referred to by file descriptor fildes.
Upon successful completion, statfsdev() and fstatfsdev() return zero. Otherwise, they return -1 and set the global variable errno to indicate the error.
statfsdev() fails if one or more of the following conditions are encountered:
fstatfsdev() fails if one or more of the following is true:
Both fstatfsdev() and statfsdev() fail if one or more of the following is true:
statfsdev() and fstatfsdev() are deprecated and should be used only by legacy 32-bit applications. statvfsdev64() and fstatvfsdev64() are the recommended replacements. See fgetpos64(3S).