• Antelope Release 5.9 Mac OS X 10.13.2 2019-05-01

 

NAME

std_statvfs - system independent replacement for statfs and statvfs

SYNOPSIS

#include "stock.h"

int std_statvfs(const char *path, Std_statvfs *buf)

DESCRIPTION

Solaris provided statvfs to obtain information about the filesystem corresponding to a path. Darwin provides statfs, as does Linux; linux also has an undocumented statvfs which apparently lacks support.

The Solaris statvfs returned a unique integer f_fsid for each filesystem, while Linux always returns 0 in the f_fsid field. However, this field is used in rtm(1) and rtexec(1) to determine what the fields are. Consequently, std_statvfs returns the number of blocks used on the filesystem as the f_fsid field.

EXAMPLE


if ( std_statvfs(path, &stat) ) {
    complain ( 1, "std_statvfs failed" ) ;
} else {
    show_statvfs(path, &stat) ;
}

RETURN VALUES

returns 0 for success, non-zero otherwise

LIBRARY

$(STOCKLIBS)

ATTRIBUTES

MT-Safe ?

SEE ALSO

statvfs(2)
statfs(2)

AUTHOR

Daniel Quinlan
Printer icon