Manual Pages for UNIX Darwin command on man fstatvfs
MyWebUniversity

Manual Pages for UNIX Darwin command on man fstatvfs

STATVFS(3) BSD Library Functions Manual STATVFS(3)

NAME

ssttaattvvffss, ffssttaattvvffss - retrieve file system information

LLIIBBRRAARRYY

Standard C Library (libc, -lc)

SYNOPSIS

##iinncclluuddee <>

int ssttaattvvffss(const char * restrict path, struct statvfs * restrict buf); int ffssttaattvvffss(int fd, struct statvfs *buf);

DESCRIPTION

The ssttaattvvffss() and ffssttaattvvffss() functions attempt to fill the structure pointed to by buf with file system statistics, but portable applications must not depend on this. Applications must pass a pathname or file descriptor which refers to a file on the file system in which they are interested. The statvfs structure contains the following members: fnamemax The maximum length in bytes of a file name on this file system. Applications should use pathconf(2) instead. ffsid Not meaningful in this implementation. ffrsize The size in bytes of the minimum unit of allocation on

this file system. (This corresponds to the fbsize mem-

ber of struct statfs.) fbsize The preferred length of I/O requests for files on this file system. (Corresponds to the fiosize member of struct statfs.) fflag Flags describing mount options for this file system; see below. In addition, there are three members of type fsfilcntt, which represent counts of file serial numbers (i.e., inodes); these are named ffiles, ffavail, and fffree, and represent the number of file serial numbers which exist in total, are available to unprivileged processes, and are available to privileged processes, respectively. Likewise, the members fblocks, fbavail, and fbfree (all of type fsblkcntt) represent the

respective allocation-block counts.

There are two flags defined for the fflag member:

STRDONLY The file system is mounted read-only.

STNOSUID The semantics of the SISUID and SISGID file mode bits

are not supported by, or are disabled on, this file sys-

tem. IIMMPPLLEEMMEENNTTAATTIIOONN NNOOTTEESS The ssttaattvvffss() and ffssttaattvvffss() functions are implemented as wrappers around

the ssttaattffss() and ffssttaattffss() functions, respectively. Not all the informa-

tion provided by those functions is made available through this inter-

face.

RETURN VALUES

The ssttaattvvffss() and ffssttaattvvffss() functions return the value 0 if successful;

otherwise the value -1 is returned and the global variable errno is set

to indicate the error. EERRRROORRSS The ssttaattvvffss() function fails if one or more of the following are true:

[ENOTDIR] A component of the path prefix of Path is not a direc-

tory.

[ENAMETOOLONG] The length of a component of path exceeds {NAMEMAX}

characters, or the length of path exceeds {PATHMAX} characters. [ENOENT] The file referred to by path does not exist. [EACCES] Search permission is denied for a component of the path prefix of path.

[ELOOP] Too many symbolic links were encountered in translat-

ing path. [EFAULT] Buf or path points to an invalid address. [EIO] An I/O error occurred while reading from or writing to the file system. The ffssttaattvvffss() functions fails if one or more of the following are true: [EBADF] fd is not a valid open file descriptor. [EFAULT] Buf points to an invalid address. [EIO] An I/O error occurred while reading from or writing to the file system.

SEE ALSO

statfs(2) STANDARDS

The ssttaattvvffss() and ffssttaattvvffss() functions conform to IEEE Std 1003.1-2001

(``POSIX.1''). As standardized, portable applications cannot depend on

these functions returning any valid information at all. This implementa-

tion attempts to provide as much useful information as is provided by the underlying file system, subject to the limitations of the specified data types. AUTHORS The ssttaattvvffss() and ffssttaattvvffss() manual page was originally written by Garrett Wollman . BSD July 13, 2002 BSD




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™