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

NAME

6       explain_futimes - explain futimes(3) errors
7

SYNOPSIS

9       #include <libexplain/futimes.h>
10       const char *explain_futimes(int fildes, const struct timeval *tv);
11       const  char *explain_errno_futimes(int errnum, int fildes, const struct
12       timeval *tv);
13       void  explain_message_futimes(char  *message,  int  message_size,   int
14       fildes, const struct timeval *tv);
15       void explain_message_errno_futimes(char *message, int message_size, int
16       errnum, int fildes, const struct timeval *tv);
17

DESCRIPTION

19       These functions may be used to obtain explanations for errors  returned
20       by the futimes(3) system call.
21
22   explain_futimes
23       const char *explain_futimes(int fildes, const struct timeval *tv);
24
25       The  explain_futimes  function  is  used to obtain an explanation of an
26       error returned by the futimes(3) system call.  The  least  the  message
27       will  contain  is  the value of strerror(errno), but usually it will do
28       much better, and indicate the underlying cause in more detail.
29
30       The errno global variable will be used to obtain the error value to  be
31       decoded.
32
33       This  function  is intended to be used in a fashion similar to the fol‐
34       lowing example:
35              if (futimes(fildes, tv) < 0)
36              {
37                  fprintf(stderr, "%s\n", explain_futimes(fildes, tv));
38                  exit(EXIT_FAILURE);
39              }
40
41       The   above   code   example   is   available   pre‐packaged   as   the
42       explain_futimes_or_die(3) function.
43
44       fildes  The original fildes, exactly as passed to the futimes(3) system
45               call.
46
47       tv      The original tv, exactly as passed  to  the  futimes(3)  system
48               call.
49
50       Returns:
51               The  message  explaining  the  error.   This  message buffer is
52               shared by all libexplain functions which do not supply a buffer
53               in  their  argument list.  This will be overwritten by the next
54               call to any  libexplain  function  which  shares  this  buffer,
55               including other threads.
56
57       Note: This function is not thread safe, because it shares a return buf‐
58       fer across all threads, and many other functions in this library.
59
60   explain_errno_futimes
61       const char *explain_errno_futimes(int errnum, int fildes, const  struct
62       timeval *tv);
63
64       The  explain_errno_futimes function is used to obtain an explanation of
65       an error returned by the futimes(3) system call.  The least the message
66       will  contain  is the value of strerror(errnum), but usually it will do
67       much better, and indicate the underlying cause in more detail.
68
69       This function is intended to be used in a fashion similar to  the  fol‐
70       lowing example:
71              if (futimes(fildes, tv) < 0)
72              {
73                  int err = errno;
74                  fprintf(stderr, "%s\n", explain_errno_futimes(err, fildes, tv));
75                  exit(EXIT_FAILURE);
76              }
77
78       The   above   code   example   is   available   pre‐packaged   as   the
79       explain_futimes_or_die(3) function.
80
81       errnum  The error value to be decoded, usually obtained from the  errno
82               global  variable  just before this function is called.  This is
83               necessary if you need to call any code between the system  call
84               to  be explained and this function, because many libc functions
85               will alter the value of errno.
86
87       fildes  The original fildes, exactly as passed to the futimes(3) system
88               call.
89
90       tv      The  original  tv,  exactly  as passed to the futimes(3) system
91               call.
92
93       Returns:
94               The message explaining  the  error.   This  message  buffer  is
95               shared by all libexplain functions which do not supply a buffer
96               in their argument list.  This will be overwritten by  the  next
97               call  to  any  libexplain  function  which  shares this buffer,
98               including other threads.
99
100       Note: This function is not thread safe, because it shares a return buf‐
101       fer across all threads, and many other functions in this library.
102
103   explain_message_futimes
104       void   explain_message_futimes(char  *message,  int  message_size,  int
105       fildes, const struct timeval *tv);
106
107       The explain_message_futimes function may be used to  obtain an explana‐
108       tion of an error returned by the futimes(3) system call.  The least the
109       message will contain is the value of strerror(errno),  but  usually  it
110       will do much better, and indicate the underlying cause in more detail.
111
112       The  errno global variable will be used to obtain the error value to be
113       decoded.
114
115       This function is intended to be used in a fashion similar to  the  fol‐
116       lowing example:
117              if (futimes(fildes, tv) < 0)
118              {
119                  char message[3000];
120                  explain_message_futimes(message, sizeof(message), fildes, tv);
121                  fprintf(stderr, "%s\n", message);
122                  exit(EXIT_FAILURE);
123              }
124
125       The   above   code   example   is   available   pre‐packaged   as   the
126       explain_futimes_or_die(3) function.
127
128       message The location in which to store  the  returned  message.   If  a
129               suitable  message  return  buffer is supplied, this function is
130               thread safe.
131
132       message_size
133               The size in bytes  of  the  location  in  which  to  store  the
134               returned message.
135
136       fildes  The original fildes, exactly as passed to the futimes(3) system
137               call.
138
139       tv      The original tv, exactly as passed  to  the  futimes(3)  system
140               call.
141
142   explain_message_errno_futimes
143       void explain_message_errno_futimes(char *message, int message_size, int
144       errnum, int fildes, const struct timeval *tv);
145
146       The explain_message_errno_futimes function may be  used  to  obtain  an
147       explanation  of  an  error returned by the futimes(3) system call.  The
148       least the message will contain is the value  of  strerror(errnum),  but
149       usually  it  will  do much better, and indicate the underlying cause in
150       more detail.
151
152       This function is intended to be used in a fashion similar to  the  fol‐
153       lowing example:
154              if (futimes(fildes, tv) < 0)
155              {
156                  int err = errno;
157                  char message[3000];
158                  explain_message_errno_futimes(message, sizeof(message), err, fildes, tv);
159                  fprintf(stderr, "%s\n", message);
160                  exit(EXIT_FAILURE);
161              }
162
163       The   above   code   example   is   available   pre‐packaged   as   the
164       explain_futimes_or_die(3) function.
165
166       message The location in which to store  the  returned  message.   If  a
167               suitable  message  return  buffer is supplied, this function is
168               thread safe.
169
170       message_size
171               The size in bytes  of  the  location  in  which  to  store  the
172               returned message.
173
174       errnum  The  error value to be decoded, usually obtained from the errno
175               global variable just before this function is called.   This  is
176               necessary  if you need to call any code between the system call
177               to be explained and this function, because many libc  functions
178               will alter the value of errno.
179
180       fildes  The original fildes, exactly as passed to the futimes(3) system
181               call.
182
183       tv      The original tv, exactly as passed  to  the  futimes(3)  system
184               call.
185

SEE ALSO

187       futimes(3)
188               change file timestamps
189
190       explain_futimes_or_die(3)
191               change file timestamps and report errors
192
194       libexplain version 0.40
195       Copyright (C) 2008 Peter Miller
196
197
198
199                                                            explain_futimes(3)
Impressum