Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

explain_ustat_or_die(3) [debian man page]

explain_ustat_or_die(3) 				     Library Functions Manual					   explain_ustat_or_die(3)

NAME
explain_ustat_or_die - get file system statistics and report errors SYNOPSIS
#include <libexplain/ustat.h> void explain_ustat_or_die(dev_t dev, struct ustat *ubuf); int explain_ustat_on_error(dev_t dev, struct ustat *ubuf); DESCRIPTION
The explain_ustat_or_die function is used to call the ustat(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_ustat(3) function, and then the process terminates by calling exit(EXIT_FAILURE). The explain_ustat_on_error function is used to call the ustat(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_ustat(3) function, but still returns to the caller. dev The dev, exactly as to be passed to the ustat(2) system call. ubuf The ubuf, exactly as to be passed to the ustat(2) system call. RETURN VALUE
The explain_ustat_or_die function only returns on success, see ustat(2) for more information. On failure, prints an explanation and exits, it does not return. The explain_ustat_on_error function always returns the value return by the wrapped ustat(2) system call. EXAMPLE
The explain_ustat_or_die function is intended to be used in a fashion similar to the following example: explain_ustat_or_die(dev, ubuf); SEE ALSO
ustat(2) get file system statistics explain_ustat(3) explain ustat(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2009 Peter Miller explain_ustat_or_die(3)

Check Out this Related Man Page

USTAT(2)                                                     Linux Programmer's Manual                                                    USTAT(2)

NAME
ustat - get filesystem statistics SYNOPSIS
#include <sys/types.h> #include <unistd.h> /* libc[45] */ #include <ustat.h> /* glibc2 */ int ustat(dev_t dev, struct ustat *ubuf); DESCRIPTION
ustat() returns information about a mounted filesystem. dev is a device number identifying a device containing a mounted filesystem. ubuf is a pointer to a ustat structure that contains the following members: daddr_t f_tfree; /* Total free blocks */ ino_t f_tinode; /* Number of free inodes */ char f_fname[6]; /* Filsys name */ char f_fpack[6]; /* Filsys pack name */ The last two fields, f_fname and f_fpack, are not implemented and will always be filled with null bytes (''). RETURN VALUE
On success, zero is returned and the ustat structure pointed to by ubuf will be filled in. On error, -1 is returned, and errno is set appropriately. ERRORS
EFAULT ubuf points outside of your accessible address space. EINVAL dev does not refer to a device containing a mounted filesystem. ENOSYS The mounted filesystem referenced by dev does not support this operation, or any version of Linux before 1.3.16. CONFORMING TO
SVr4. NOTES
ustat() is deprecated and has been provided only for compatibility. All new programs should use statfs(2) instead. HP-UX notes The HP-UX version of the ustat structure has an additional field, f_blksize, that is unknown elsewhere. HP-UX warns: For some filesystems, the number of free inodes does not change. Such filesystems will return -1 in the field f_tinode. For some filesystems, inodes are dynam- ically allocated. Such filesystems will return the current number of free inodes. SEE ALSO
stat(2), statfs(2) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 USTAT(2)
Man Page