FD_STATFS(3H) — Pixar Programmer’s Manual — libfd
NAME
fd_statfs− obtain information about fast-disk filesystem
SYNOPSIS
#include <fd.h>
fd_statfs(path, fs)
char ∗path;
struct fdstatfs ∗fs;
DESCRIPTION
Fd_statfs returns information about the filesystem that contains the file or directory path. Upon success, fd_statfs returns filesystem information into the structure pointed to by fs. The following fields are returned:
fs_rootpath
A pointer to a NUL-terminated string representing the absolute Fast-Disk filesystem pathname of the root directory of the filesystem containing path. This string may be copied, but must not be modified; libfd will behave strangely if this rule is broken.
fs_blocks Total size of filesystem in 4096-byte blocks.
fs_bfree Total number of free blocks available to hold file and directory data. This number will always be less than fs_blocks.
fs_maxcontig
Number of blocks in the largest contiguous free extent. This number will always be less than or equal to fs_bfree. It is possible to use fdck(8) to compact the filesystem and improve this value without removing any files.
RETURN VALUE
A 0 value is returned if the operation succeeds; otherwise fd_statfs returns -1 and the global variable errno indicates the reason for the failure.
ERRORS
[ENOTDIR] A component of the path prefix is not a directory.
[ENOENT] Path does not exist.
[EIO] An I/O error occurred reading the Fast-Disk.
[ENOMEM] No memory was available in the user’s process to allocate various resources.
SEE ALSO
Release β — Last change: 10/12/88