Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > S

statfsdev(3C)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

statfsdev(), fstatfsdev() — get file system statistics

SYNOPSIS

#include <sys/vfs.h>

int statfsdev(const char *path, struct statfs *buf);

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

DESCRIPTION

statfsdev() returns information about the file system contained in 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:

int32_t f_bavail /* free blocks available to non-superuser */ int32_t f_bfree /* free blocks */ int32_t f_blocks /* total blocks in file system */ int32_t f_bsize /* fundamental file system block size in bytes */ int32_t f_ffree /* free file nodes in file system */ int32_t f_files /* total file nodes in file system */ int32_t f_type /* type of info, zero for now */ fsid_t f_fsid /* file system ID. f_fsid[1] is MOUNT_UFS, MOUNT_NFS, or MOUNT_CDFS */

The fields f_blocks, f_bavail, and f_bfree are expressed in terms of blocks of size f_bsize.

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, statfsdev() and fstatfsdev() return zero. Otherwise, they return -1 and set the global variable errno to indicate the error.

ERRORS

statfsdev() fails if one or more of the following conditions are encountered:

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 length of the specified path name exceeds PATH_MAX bytes, or the length of a component of the path name exceeds NAME_MAX bytes while _POSIX_NO_TRUNC is in effect.

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.

EOVERFLOW

Result would overflow one or more fields of the statfs struct.

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.

ENOLCK

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

ESOCKETSHUTDOWN

Contact your system administrator to make sure the fsdaemon is running properly on the system.

WARNINGS

statfsdev() and fstatfsdev() are deprecated and should be used only by legacy 32-bit applications. statvfsdev64() and fstatvfsdev64() are the recommended replacements. See fgetpos64(3S).

AUTHOR

statfsdev() and fstatfsdev() were developed by HP.

FILES

/usr/include/sys/mount.h

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.