Scroll to navigation

RFIO_STATFS(3) Rfio Library Functions RFIO_STATFS(3)

NAME

rfio_statfs - get information about a mounted filesystem

SYNOPSIS

#include <sys/types.h>
#include "rfio_api.h"

int rfio_statfs (const char *path, struct rfstatfs *statfsbuf);

Under Linux, for large files:
#define _LARGEFILE64_SOURCE
#include <sys/types.h>
#include "rfio_api.h"

int rfio_statfs64 (const char *path, struct rfstatfs64 *statfsbuf);

For large files, under other systems:
#include <sys/types.h>
#include "rfio_api.h"

int rfio_statfs64 (const char *path, struct rfstatfs64 *statfsbuf);

DESCRIPTION

rfio_statfs gets information about a mounted filesystem.

specifies the logical pathname relative to the current directory or the full pathname of any file in this filesystem.
is a pointer to a rfstatfs structure:
struct rfstatfs {

long totblks ; /* Total number of blocks */
long freeblks ; /* Number of free blocks */
long bsize ; /* Block size */
long totnods ; /* Total number of inodes */
long freenods ; /* Number of free inodes */ }; struct rfstatfs64 {
signed64 totblks ; /* Total number of blocks */
signed64 freeblks ; /* Number of free blocks */
long bsize ; /* Block size */
signed64 totnods ; /* Total number of inodes */
signed64 freenods ; /* Number of free inodes */ };

The 64 bits function must be used for large filesystems. It has the same syntax as the normal statfs function except that it uses a rfstatfs64 structure.

RETURN VALUE

This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately.

ERRORS

The named file/directory does not exist or is a null pathname.
Search permission is denied on a component of the path prefix.
path or statfsbuf is a NULL pointer.
A component of path prefix is not a directory.
The length of path exceeds CA_MAXPATHLEN or the length of a path component exceeds CA_MAXNAMELEN.
Host unknown.
Service unknown.
Communication error.

SEE ALSO

Castor_limits(4)

AUTHOR

LCG Grid Deployment Team

$Date: 2005/09/20 12:07:09 $ LCG