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

NAME

6       explain_linkat_or_die  -  link  a file relative to directory and report
7       errors
8

SYNOPSIS

10       #include <libexplain/linkat.h>
11       void explain_linkat_or_die(int old_dirfd,  const  char  *old_path,  int
12       new_fildes, const char *new_path, int flags);
13       int  explain_linkat_on_error(int  old_dirfd,  const char *old_path, int
14       new_fildes, const char *new_path, int flags);
15

DESCRIPTION

17       The explain_linkat_or_die function is used to call the linkat(2) system
18       call.  On  failure  an  explanation will be printed to stderr, obtained
19       from the explain_linkat(3) function, and then the process terminates by
20       calling exit(EXIT_FAILURE).
21
22       The explain_linkat_on_error function is used to call the linkat(2) sys‐
23       tem call. On failure an explanation will be printed to stderr, obtained
24       from the explain_linkat(3) function, but still returns to the caller.
25
26       old_dirfd
27               The  old_dirfd, exactly as to be passed to the linkat(2) system
28               call.
29
30       old_path
31               The old_path, exactly as to be passed to the  linkat(2)  system
32               call.
33
34       new_fildes
35               The new_fildes, exactly as to be passed to the linkat(2) system
36               call.
37
38       new_path
39               The new_path, exactly as to be passed to the  linkat(2)  system
40               call.
41
42       flags   The  flags,  exactly  as  to  be passed to the linkat(2) system
43               call.
44

RETURN VALUE

46       The  explain_linkat_or_die  function  only  returns  on  success,   see
47       linkat(2)  for  more information. On failure, prints an explanation and
48       exits, it does not return.
49
50       The explain_linkat_on_error function always returns the value return by
51       the wrapped linkat(2) system call.
52

EXAMPLE

54       The  explain_linkat_or_die function is intended to be used in a fashion
55       similar to the following example:
56              explain_linkat_or_die(old_dirfd, old_path, new_fildes, new_path, flags);
57

SEE ALSO

59       linkat(2)
60               create a file link relative to directory file descriptors
61
62       explain_linkat(3)
63               explain linkat(2) errors
64
65       exit(2) terminate the calling process
66
68       libexplain version 1.4
69       Copyright (C) 2013 Peter Miller
70
71
72
73                                                      explain_linkat_or_die(3)
Impressum