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

NAME

6       explain_statvfs_or_die - get file system statistics and report errors
7

SYNOPSIS

9       #include <libexplain/statvfs.h>
10       void   explain_statvfs_or_die(const   char  *pathname,  struct  statvfs
11       *data);
12       int  explain_statvfs_on_error(const  char  *pathname,  struct   statvfs
13       *data);
14

DESCRIPTION

16       The explain_statvfs_or_die function is used to call the statvfs(2) sys‐
17       tem call. On failure an explanation will be printed to stderr, obtained
18       from  the  explain_statvfs(3) function, and then the process terminates
19       by calling exit(EXIT_FAILURE).
20
21       The explain_statvfs_on_error function is used to  call  the  statvfs(2)
22       system  call.  On  failure  an  explanation  will be printed to stderr,
23       obtained from the explain_statvfs(3) function, but still returns to the
24       caller.
25
26       pathname
27               The  pathname, exactly as to be passed to the statvfs(2) system
28               call.
29
30       data    The data, exactly as to be  passed  to  the  statvfs(2)  system
31               call.
32

RETURN VALUE

34       The  explain_statvfs_or_die  function  only  returns  on  success,  see
35       statvfs(2) for more information. On failure, prints an explanation  and
36       exits, it does not return.
37
38       The  explain_statvfs_on_error  function always returns the value return
39       by the wrapped statvfs(2) system call.
40

EXAMPLE

42       The explain_statvfs_or_die function is intended to be used in a fashion
43       similar to the following example:
44              explain_statvfs_or_die(pathname, data);
45

SEE ALSO

47       statvfs(2)
48               get file system statistics
49
50       explain_statvfs(3)
51               explain statvfs(2) errors
52
53       exit(2) terminate the calling process
54
56       libexplain version 1.4
57       Copyright (C) 2010 Peter Miller
58
59
60
61                                                     explain_statvfs_or_die(3)
Impressum