statvfs(2) DG/UX R4.11MU05 statvfs(2)
NAME
statvfs - return information about a file system
SYNOPSIS
#include <sys/types.h>
#include <sys/statvfs.h>
int statvfs (const char *pathname, struct statvfs *buffer)
where:
pathname The pathname of a file in the file system to be reported on
buffer Address of statvfs buffer where file system information
will be returned
DESCRIPTION
Pathname must be that of a file residing in the file system desired
for report on. Read, write, or execute permission to the file is not
required, but all directories preceding the file named must be
searchable. The information returned about the file system includes:
ulong fbsize; /* file system block size */
ulong ffrsize; /* file system fragment size */
ulong fblocks; /* total number of blocks of ffrsize
contained in the file system */
ulong fbfree; /* total number of free blocks */
ulong fbavail; /* number of free blocks available to
a user without appropriate privilege */
ulong ffsid; /* file system identifier */
char fbasetype[FSTYPSZ]; /* null-terminated fs type
name */
ulong fflag; /* bit mask of flags */
ulong fnamemax; /* maximum file name length */
char ffstr[32]; /* file system specific string */
f_basetype contains the file system type name and is null-terminated.
The value for the constant FSTYPSZ is defined in the <statvfs.h>
file.
The f_flag can return the following:
ST_RDONLY /* a read-only file system */
ST_NOSUID /* file system does not support the setuid
or setgid semantics */
ST_NOTRUNC /* file system does not truncate long file names */
ACCESS CONTROL
None.
RETURN VALUE
0 The information was successfully returned in the statvfs
buffer.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EACCES If the search permission does not exist on a component
of the pathname.
ELOOP There were too many symbolic links involved in
resolving the path.
ENAMETOOLONG If the pathname given exceeds the maximum path length.
ENOENT The file name referred to does not exist.
ENOTDIR A prefix of the pathname component is not a directory.
SEE ALSO
chmod(2), chown(2), creat(2), dup(2), fcntl(2), link(2), mknod(2),
open(2), pipe(2), read(2), time(2), unlink(2), ustat(2), utime(2),
write(2), appropriateprivilege(5).
capdefaults(5).
NOTES
On a traditional DG/UX system, appropriate privilege is granted by
having an effective UID of 0 (root). See the
appropriateprivilege(5) man page for more information.
On a system with DG/UX information security, appropriate privilege is
granted by having one or more specific capabilities enabled in the
effective capability set of the user. See cap_defaults(5) for the
default capabilities for this command.
Licensed material--property of copyright holder(s)