Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ statfsdev(3C) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bdf(1M)

df(1M)

stat(2)

statfs(2)

STATFSDEV(3C)

NAME

statfsdev, fstatfsdev − get file system statistics

SYNOPSIS

#include <sys/types.h>
#include <sys/vfs.h>
int statfsdev(path, buf)
char *path;
struct statfs *buf;

int fstatfsdev(fildes, buf)
int fildes;
struct statfs *buf;

DESCRIPTION

Statfsdev 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 */

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 VALUE

Upon successful completion, a value of 0 is returned.  Otherwise, −1 is returned and the global variable errno is set to indicate the error. 

ERRORS

Statfsdev fails if one or more of the following is true:

[EACCES] Search permission is denied for a component of the path prefix. 

[EAGAIN] The file exists, enforcement mode file/record locking is set, and there are outstanding record locks on the file. 

[EFAULT] Path points to an invalid address. 

[ELOOP] Too many symbolic links are encountered in translating the path name. 

[EMFILE] The maximum number of file descriptors allowed are currently open. 

[ENAMETOOLONG]
The path name is too long.

[ENFILE] The system file table is full. 

[ENOENT] The named file does not exist. 

[ENOTDIR] A component of the path prefix is not a directory. 

[ENXIO] The device specified by the named special file does not exist. 

Fstatfsdev fails if one or more of the following is true:

[EBADF] Fildes is not a valid open file descriptor. 

[ESPIPE] filedes points to an invalid address. 

Both fstatfsdev and statfsdev fail if one or more of the following is true:

[EAGAIN] Enforcement-mode record locking was set, and there was a blocking write lock. 

[EDEADLK] A resource deadlock would occur as a result of this operation. 

[EINTR] A system call was interrupted by a signal. 

[EINVAL] The file specified by path or filedes does not contain a file system of any known type. 

[ENOLOCK] The system lock table was full, so the read could not go to sleep until the blocking write lock was removed. 

AUTHOR

Statfsdev and fstatfsdev were developed by HP. 

FILES

/usr/include/sys/mount.h

SEE ALSO

bdf(1M), df(1M), stat(2), statfs(2). 

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026