1explain_statfs_or_die(3) Library Functions Manual explain_statfs_or_die(3)
2
3
4
6 explain_statfs_or_die - get file system statistics and report errors
7
9 #include <libexplain/statfs.h>
10 void explain_statfs_or_die(const char *pathname, struct statfs *data);
11 int explain_statfs_on_error(const char *pathname, struct statfs *data);
12
14 The explain_statfs_or_die function is used to call the statfs(2) system
15 call. On failure an explanation will be printed to stderr, obtained
16 from the explain_statfs(3) function, and then the process terminates by
17 calling exit(EXIT_FAILURE).
18
19 The explain_statfs_on_error function is used to call the statfs(2) sys‐
20 tem call. On failure an explanation will be printed to stderr, obtained
21 from the explain_statfs(3) function, but still returns to the caller.
22
23 pathname
24 The pathname, exactly as to be passed to the statfs(2) system
25 call.
26
27 data The data, exactly as to be passed to the statfs(2) system call.
28
30 The explain_statfs_or_die function only returns on success, see
31 statfs(2) for more information. On failure, prints an explanation and
32 exits, it does not return.
33
34 The explain_statfs_on_error function always returns the value return by
35 the wrapped statfs(2) system call.
36
38 The explain_statfs_or_die function is intended to be used in a fashion
39 similar to the following example:
40 explain_statfs_or_die(pathname, data);
41
43 statfs(2)
44 get file system statistics
45
46 explain_statfs(3)
47 explain statfs(2) errors
48
49 exit(2) terminate the calling process
50
52 libexplain version 0.40
53 Copyright (C) 2009 Peter Miller
54
55
56
57 explain_statfs_or_die(3)