1explain_fchownat_or_die(3) Library Functions Manual explain_fchownat_or_die(3)
2
3
4
6 explain_fchownat_or_die - change ownership of a file relative to a
7 directory and report errors
8
10 #include <libexplain/fchownat.h>
11 void explain_fchownat_or_die(int dirfd, const char *pathname, int
12 owner, int group, int flags);
13 int explain_fchownat_on_error(int dirfd, const char *pathname, int
14 owner, int group, int flags);
15
17 The explain_fchownat_or_die function is used to call the fchownat(2)
18 system call. On failure an explanation will be printed to stderr,
19 obtained from the explain_fchownat(3) function, and then the process
20 terminates by calling exit(EXIT_FAILURE).
21
22 The explain_fchownat_on_error function is used to call the fchownat(2)
23 system call. On failure an explanation will be printed to stderr,
24 obtained from the explain_fchownat(3) function, but still returns to
25 the caller.
26
27 dirfd The dirfd, exactly as to be passed to the fchownat(2) system
28 call.
29
30 pathname
31 The pathname, exactly as to be passed to the fchownat(2) system
32 call.
33
34 owner The owner, exactly as to be passed to the fchownat(2) system
35 call.
36
37 group The group, exactly as to be passed to the fchownat(2) system
38 call.
39
40 flags The flags, exactly as to be passed to the fchownat(2) system
41 call.
42
44 The explain_fchownat_or_die function only returns on success, see
45 fchownat(2) for more information. On failure, prints an explanation and
46 exits, it does not return.
47
48 The explain_fchownat_on_error function always returns the value return
49 by the wrapped fchownat(2) system call.
50
52 The explain_fchownat_or_die function is intended to be used in a fash‐
53 ion similar to the following example:
54 explain_fchownat_or_die(dirfd, pathname, owner, group, flags);
55
57 fchownat(2)
58 change ownership of a file relative to a directory
59
60 explain_fchownat(3)
61 explain fchownat(2) errors
62
63 exit(2) terminate the calling process
64
66 libexplain version 1.4
67 Copyright (C) 2013 Peter Miller
68
69
70
71 explain_fchownat_or_die(3)