]> Dogcows Code - chaz/tar/blob - lib/attr-xattr.in.h
Prepare for implementing extended attribute support.
[chaz/tar] / lib / attr-xattr.in.h
1 /* Replacement <attr/xattr.h> for platforms that lack it.
2 Copyright (C) 2012 Free Software Foundation, Inc.
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
16
17 #ifndef TAR_ATTR_XATTR_H
18 #define TAR_ATTR_XATTR_H
19 #include <errno.h>
20
21 /* setting */
22 static inline int setxattr (const char *path, const char *name, const void
23 *value, size_t size, int flags)
24 { errno = ENOTSUP; return -1; }
25
26 static inline int lsetxattr (const char *path, const char *name, const void
27 *value, size_t size, int flags)
28 { errno = ENOTSUP; return -1; }
29
30 static inline int fsetxattr (int filedes, const char *name, const void *value,
31 size_t size, int flags)
32 { errno = ENOTSUP; return -1; }
33
34
35 /* getting */
36 static inline ssize_t getxattr (const char *path, const char *name, void *value,
37 size_t size)
38 { errno = ENOTSUP; return -1; }
39 static inline ssize_t lgetxattr (const char *path, const char *name, void
40 *value, size_t size)
41 { errno = ENOTSUP; return -1; }
42 static inline ssize_t fgetxattr (int filedes, const char *name, void *value,
43 size_t size)
44 { errno = ENOTSUP; return -1; }
45
46
47 /* listing */
48 static inline ssize_t listxattr (const char *path, char *list, size_t size)
49 { errno = ENOTSUP; return -1; }
50
51 static inline ssize_t llistxattr (const char *path, char *list, size_t size)
52 { errno = ENOTSUP; return -1; }
53
54 static inline ssize_t flistxattr (int filedes, char *list, size_t size)
55 { errno = ENOTSUP; return -1; }
56
57 #endif
58
This page took 0.03556 seconds and 5 git commands to generate.