]> Dogcows Code - chaz/tar/blob - lib/xattr-at.c
Update copyright years.
[chaz/tar] / lib / xattr-at.c
1 /* openat-style fd-relative functions for operating with extended file
2 attributes.
3
4 Copyright 2012-2014 Free Software Foundation, Inc.
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18
19 #include <config.h>
20
21 #include "xattr-at.h"
22 #include "openat.h"
23
24 #include <stdlib.h>
25 #include <unistd.h>
26 #include <errno.h>
27 #include <fcntl.h>
28
29 #include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
30 #include "save-cwd.h"
31
32 #include "openat-priv.h"
33
34 /* setxattrat */
35 #define AT_FUNC_NAME setxattrat
36 #define AT_FUNC_F1 setxattr
37 #define AT_FUNC_POST_FILE_PARAM_DECLS , const char *name, const void *value \
38 , size_t size, int flags
39 #define AT_FUNC_POST_FILE_ARGS , name, value, size, flags
40 #include "at-func.c"
41 #undef AT_FUNC_NAME
42 #undef AT_FUNC_F1
43 #undef AT_FUNC_POST_FILE_PARAM_DECLS
44 #undef AT_FUNC_POST_FILE_ARGS
45
46 /* lsetxattrat */
47 #define AT_FUNC_NAME lsetxattrat
48 #define AT_FUNC_F1 lsetxattr
49 #define AT_FUNC_POST_FILE_PARAM_DECLS , const char *name, const void *value \
50 , size_t size, int flags
51 #define AT_FUNC_POST_FILE_ARGS , name, value, size, flags
52 #include "at-func.c"
53 #undef AT_FUNC_NAME
54 #undef AT_FUNC_F1
55 #undef AT_FUNC_POST_FILE_PARAM_DECLS
56 #undef AT_FUNC_POST_FILE_ARGS
57
58 /* getxattrat */
59 #define AT_FUNC_NAME getxattrat
60 #define AT_FUNC_RESULT ssize_t
61 #define AT_FUNC_F1 getxattr
62 #define AT_FUNC_POST_FILE_PARAM_DECLS , const char *name, void *value \
63 , size_t size
64 #define AT_FUNC_POST_FILE_ARGS , name, value, size
65 #include "at-func.c"
66 #undef AT_FUNC_NAME
67 #undef AT_FUNC_F1
68 #undef AT_FUNC_RESULT
69 #undef AT_FUNC_POST_FILE_PARAM_DECLS
70 #undef AT_FUNC_POST_FILE_ARGS
71
72 /* lgetxattrat */
73 #define AT_FUNC_NAME lgetxattrat
74 #define AT_FUNC_RESULT ssize_t
75 #define AT_FUNC_F1 lgetxattr
76 #define AT_FUNC_POST_FILE_PARAM_DECLS , const char *name, void *value \
77 , size_t size
78 #define AT_FUNC_POST_FILE_ARGS , name, value, size
79 #include "at-func.c"
80 #undef AT_FUNC_NAME
81 #undef AT_FUNC_F1
82 #undef AT_FUNC_RESULT
83 #undef AT_FUNC_POST_FILE_PARAM_DECLS
84 #undef AT_FUNC_POST_FILE_ARGS
85
86 /* listxattrat */
87 #define AT_FUNC_NAME listxattrat
88 #define AT_FUNC_RESULT ssize_t
89 #define AT_FUNC_F1 listxattr
90 #define AT_FUNC_POST_FILE_PARAM_DECLS , char *list , size_t size
91 #define AT_FUNC_POST_FILE_ARGS , list , size
92 #include "at-func.c"
93 #undef AT_FUNC_NAME
94 #undef AT_FUNC_F1
95 #undef AT_FUNC_RESULT
96 #undef AT_FUNC_POST_FILE_PARAM_DECLS
97 #undef AT_FUNC_POST_FILE_ARGS
98
99 /* llistxattrat */
100 #define AT_FUNC_NAME llistxattrat
101 #define AT_FUNC_RESULT ssize_t
102 #define AT_FUNC_F1 llistxattr
103 #define AT_FUNC_POST_FILE_PARAM_DECLS , char *list , size_t size
104 #define AT_FUNC_POST_FILE_ARGS , list , size
105 #include "at-func.c"
106 #undef AT_FUNC_NAME
107 #undef AT_FUNC_F1
108 #undef AT_FUNC_RESULT
109 #undef AT_FUNC_POST_FILE_PARAM_DECLS
110 #undef AT_FUNC_POST_FILE_ARGS
This page took 0.036785 seconds and 4 git commands to generate.