1explain_utimens_or_die(3) Library Functions Manual explain_utimens_or_die(3)
2
3
4
6 explain_utimens_or_die - change file timestamps and report errors
7
9 #include <libexplain/utimens.h>
10 void explain_utimens_or_die(const char *pathname, const struct timespec
11 *data);
12 int explain_utimens_on_error(const char *pathname, const struct time‐
13 spec *data);
14
16 The explain_utimens_or_die function is used to call the utimens(2) sys‐
17 tem call. On failure an explanation will be printed to stderr, obtained
18 from the explain_utimens(3) function, and then the process terminates
19 by calling exit(EXIT_FAILURE).
20
21 The explain_utimens_on_error function is used to call the utimens(2)
22 system call. On failure an explanation will be printed to stderr,
23 obtained from the explain_utimens(3) function, but still returns to the
24 caller.
25
26 pathname
27 The pathname, exactly as to be passed to the utimens(2) system
28 call.
29
30 data The data, exactly as to be passed to the utimens(2) system
31 call.
32
34 The explain_utimens_or_die function only returns on success, see uti‐
35 mens(2) for more information. On failure, prints an explanation and
36 exits, it does not return.
37
38 The explain_utimens_on_error function always returns the value return
39 by the wrapped utimens(2) system call.
40
42 The explain_utimens_or_die function is intended to be used in a fashion
43 similar to the following example:
44 explain_utimens_or_die(pathname, data);
45
47 utimens(2)
48 change file last access and modification times
49
50 explain_utimens(3)
51 explain utimens(2) errors
52
53 exit(2) terminate the calling process
54
56 libexplain version 1.4
57 Copyright (C) 2012 Peter Miller
58
59
60
61 explain_utimens_or_die(3)