statvfs64()--Get File System Information (64-Bit Enabled)


  Syntax
 #include <sys/statvfs.h>

 int statvfs64(const char *path, struct statvfs64 *buf)  
  Service Program Name: QP0LLIB1

  Default Public Authority: *USE

  Threadsafe: Conditional; see Usage Notes.

The statvfs64() function gets status information about the file system that contains the file named by the path argument. The information is placed in the area of memory pointed to by the buf argument.

If the named file is a symbolic link, statvfs64() resolves the symbolic link.

For details about authorities required, error conditions, and examples, see statvfs()--Get File System Information.


Parameters

path
(Input) A pointer to the null-terminated path name of the file from which file system information is required.

This parameter is assumed to be represented in the coded character set identifier (CCSID) currently in effect for the job. If the CCSID of the job is 65535, this parameter is assumed to be represented in the default CCSID of the job.

See QlgStatvfs64()--Get File System Information (64-Bit enabled and using NLS-enabled path name) for a description and an example of supplying the path in any CCSID.


buf
(Output) A pointer to the area to which the information should be written.

The information is returned in the following statvfs64 structure, as defined in the <sys/statvfs.h> header file. Signed fields of the statvfs64 structure that are not supported by the mounted file system will be set to -1.

unsigned long f_bsize The file system block size in bytes. This number is the number of bytes in a block of disk unit storage. Some file systems may return zero in this field. If this field is zero, then the contents of the f_blocks, f_bfree, and f_bavail fields are undefined.

unsigned long f_frsize The fundamental file system block size in bytes. Some file systems may return zero in this field. If this field is zero, then the contents of the f_blocks, f_bfree, and f_bavail fields are undefined.

unsigned long long f_blocks The total number of blocks in the file system in terms of f_frsize.

unsigned long long f_bfree The total number of free blocks in the file system.

unsigned long long f_bavail The total number of free blocks available to a non-privileged process.

unsigned long f_files The total number of file serial numbers.

unsigned long f_ffree The total number of free file serial numbers.

unsigned long f_favail The number of free file serial numbers available to a non-privileged process.

unsigned long f_fsid The file system ID. This field will be 4,294,967,295 if the value could not fit in the specified unsigned long field.

unsigned long f_flag File system flags. Symbols are defined in the <sys/statvfs.h> header file to refer to bits in this field (see The f_flags field).

unsigned long f_namemax The maximum file name length in the file system. Some file systems may return the maximum value that can be stored in an unsigned long to indicate the file system has no maximum file name length. The maximum value that can be stored in an unsigned long is defined in <limits.h> as ULONG_MAX.

This value is the number of bytes allowed in the file name if it were encoded in the CCSID of the job. If the CCSID is mixed, this number is an estimate and may be larger than the actual allowable maximum.

unsigned long f_pathmax The maximum path length in the file system. Some file systems may return the maximum value that can be stored in an unsigned long to indicate the file system has no maximum path length. The maximum value that can be stored in an unsigned long is defined in <limits.h> as ULONG_MAX.

This value is the number of bytes allowed in the file name if it were encoded in the CCSID of the job. If the CCSID is mixed, this number is an estimate and may be larger than the actual allowable maximum.

long f_objlinkmax The maximum number of hard links for objects other than directories.

long f_dirlinkmax The maximum number of hard links for a directory.

char f_reserved1[4] Reserved.

unsigned long long f_fsid64 The file system ID in 64 bit format.

char f_basetype[80] The NULL-terminated file system type name. The text in this field will be returned in the CCSID (coded character set identifier) currently in effect for the job. If the CCSID of the job is 65535, this is assumed to be represented in the default CCSID of the job.

For further details about the f_flags field, see statvfs()--Get File System Information.


Usage Notes

  1. When you develop in C-based languages, the prototypes for the 64-bit APIs are normally hidden. To use the statvfs64() API or the QlgStatvfs64() API and the struct statvfs64 data type, you must compile the source with the _LARGE_FILE_API macro defined.
  2. All of the usage notes for statvfs() apply to statvfs64() and QlgStatvfs64(). See Usage Notes in the statvfs() API.


API introduced: V4R4
Top | UNIX-Type APIs | APIs by category