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

NAME

6       explain_fstatvfs_or_die - get file system statistics and report errors
7

SYNOPSIS

9       #include <libexplain/fstatvfs.h>
10       void explain_fstatvfs_or_die(int fildes, struct statvfs *data);
11       int explain_fstatvfs_on_error(int fildes, struct statvfs *data);
12

DESCRIPTION

14       The  explain_fstatvfs_or_die  function  is used to call the fstatvfs(2)
15       system call. On failure an  explanation  will  be  printed  to  stderr,
16       obtained  from  the  explain_fstatvfs(3) function, and then the process
17       terminates by calling exit(EXIT_FAILURE).
18
19       The explain_fstatvfs_on_error function is used to call the  fstatvfs(2)
20       system  call.  On  failure  an  explanation  will be printed to stderr,
21       obtained from the explain_fstatvfs(3) function, but  still  returns  to
22       the caller.
23
24       fildes  The  fildes,  exactly as to be passed to the fstatvfs(2) system
25               call.
26
27       data    The data, exactly as to be passed  to  the  fstatvfs(2)  system
28               call.
29

RETURN VALUE

31       The  explain_fstatvfs_or_die  function  only  returns  on  success, see
32       fstatvfs(2) for more information. On failure, prints an explanation and
33       exits, it does not return.
34
35       The  explain_fstatvfs_on_error function always returns the value return
36       by the wrapped fstatvfs(2) system call.
37

EXAMPLE

39       The explain_fstatvfs_or_die function is intended to be used in a  fash‐
40       ion similar to the following example:
41              explain_fstatvfs_or_die(fildes, data);
42

SEE ALSO

44       fstatvfs(2)
45               get file system statistics
46
47       explain_fstatvfs(3)
48               explain fstatvfs(2) errors
49
50       exit(2) terminate the calling process
51
53       libexplain version 0.40
54       Copyright (C) 2010 Peter Miller
55
56
57
58                                                    explain_fstatvfs_or_die(3)
Impressum