1explain_ustat_or_die(3)    Library Functions Manual    explain_ustat_or_die(3)
2
3
4

NAME

6       explain_ustat_or_die - get file system statistics and report errors
7

SYNOPSIS

9       #include <libexplain/ustat.h>
10       void explain_ustat_or_die(dev_t dev, struct ustat *ubuf);
11       int explain_ustat_on_error(dev_t dev, struct ustat *ubuf);
12

DESCRIPTION

14       The  explain_ustat_or_die  function is used to call the ustat(2) system
15       call. On failure an explanation will be  printed  to  stderr,  obtained
16       from  the explain_ustat(3) function, and then the process terminates by
17       calling exit(EXIT_FAILURE).
18
19       The explain_ustat_on_error function is used to call the ustat(2) system
20       call.  On  failure  an  explanation will be printed to stderr, obtained
21       from the explain_ustat(3) function, but still returns to the caller.
22
23       dev     The dev, exactly as to be passed to the ustat(2) system call.
24
25       ubuf    The ubuf, exactly as to be passed to the ustat(2) system call.
26

RETURN VALUE

28       The explain_ustat_or_die function only returns on success, see ustat(2)
29       for  more  information. On failure, prints an explanation and exits, it
30       does not return.
31
32       The explain_ustat_on_error function always returns the value return  by
33       the wrapped ustat(2) system call.
34

EXAMPLE

36       The  explain_ustat_or_die  function is intended to be used in a fashion
37       similar to the following example:
38              explain_ustat_or_die(dev, ubuf);
39

SEE ALSO

41       ustat(2)
42               get file system statistics
43
44       explain_ustat(3)
45               explain ustat(2) errors
46
47       exit(2) terminate the calling process
48
50       libexplain version 1.4
51       Copyright (C) 2009 Peter Miller
52
53
54
55                                                       explain_ustat_or_die(3)
Impressum