|
|
HP-UX Reference Volume 4 of 5 > sstatfsdev(3C) |
|
NAMEstatfsdev, fstatfsdev — get file system statistics SYNOPSIS#include <sys/vfs.h> int statfsdev(const char *path, struct statfs *buf); int fstatfsdev(int fildes, struct statfs *buf); DESCRIPTIONstatfsdev() returns information about the file system on 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: long f_bavail /* free blocks available to non-superuser */ long f_bfree /* free blocks */ long f_blocks /* total blocks in file system */ long f_bsize /* fundamental file system block size in bytes */ long f_ffree /* free file nodes in file system */ long f_files /* total file nodes in file system */ long f_type /* type of info, zero for now */ fsid_t f_fsid /* file system ID. f_fsid[1] is MOUNT_UFS, MOUNT_NFS, or MOUNT_CDFS */ 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. RETURN VALUEUpon successful completion, statfsdev() and fstatfsdev() return zero. Otherwise, they return -1 and set the global variable errno to indicate the error. ERRORSstatfsdev() 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:
|
|