libexplain
1.4.D001
|
#include <libexplain/ac/stddef.h>
Go to the source code of this file.
Functions | |
int | explain_path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, int try_tmpdir) |
int | explain_path_search_explanation (struct explain_string_buffer_t *sb, int errnum, const char *dir, int try_tmpdir) |
int explain_path_search | ( | char * | tmpl, |
size_t | tmpl_len, | ||
const char * | dir, | ||
const char * | pfx, | ||
int | try_tmpdir | ||
) |
The explain_path_search function may be used to determine where to place temporary files.
The following are searched for, in order 1. Uses the first of $TMPDIR (if try_tmpdir) 2. the dir argument 3. P_tmpdir 4. /tmp
Copies into tmpl a template suitable for use with mkstemp(), et al.
tmpl | Where to write the pathname template. |
tmpl_len | The maximum available size of the pathname template. |
dir | The preferred temporary directory. |
pfx | file name prefix, must not contail any slash (/) characters |
try_tmpdir | use the $TMPDIR environment variable, if set and exists. |
EINVAL The supplied buffer for tmpl is too small. ENOENT None of the directories in the search path exist.
Definition at line 59 of file path_search.c.
int explain_path_search_explanation | ( | struct explain_string_buffer_t * | sb, |
int | errnum, | ||
const char * | dir, | ||
int | try_tmpdir | ||
) |
The explain_path_search_explanation function may be used to
sb | buffer to write into |
errnum | the error to be explained |
dir | directory to search, as passwd to path_search |
try_tmpdir | use the $TMPDIR environment variable, if set and exists. |
Definition at line 179 of file path_search.c.