]> git.ipfire.org Git - thirdparty/tar.git/blame - lib/attr-xattr.in.h
Version 1.31
[thirdparty/tar.git] / lib / attr-xattr.in.h
CommitLineData
b997c90f 1/* Replacement <attr/xattr.h> for platforms that lack it.
2684c88a 2 Copyright 2012-2019 Free Software Foundation, Inc.
b997c90f
SP
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>
cbc51277
PE
20#ifndef ENOATTR
21# define ENOATTR ENODATA /* No such attribute */
22#endif
b997c90f
SP
23
24/* setting */
25static inline int setxattr (const char *path, const char *name, const void
26 *value, size_t size, int flags)
27{ errno = ENOTSUP; return -1; }
28
29static inline int lsetxattr (const char *path, const char *name, const void
30 *value, size_t size, int flags)
31{ errno = ENOTSUP; return -1; }
32
33static inline int fsetxattr (int filedes, const char *name, const void *value,
34 size_t size, int flags)
35{ errno = ENOTSUP; return -1; }
36
37
38/* getting */
39static inline ssize_t getxattr (const char *path, const char *name, void *value,
40 size_t size)
41{ errno = ENOTSUP; return -1; }
42static inline ssize_t lgetxattr (const char *path, const char *name, void
43 *value, size_t size)
44{ errno = ENOTSUP; return -1; }
45static inline ssize_t fgetxattr (int filedes, const char *name, void *value,
46 size_t size)
47{ errno = ENOTSUP; return -1; }
48
49
50/* listing */
51static inline ssize_t listxattr (const char *path, char *list, size_t size)
52{ errno = ENOTSUP; return -1; }
53
54static inline ssize_t llistxattr (const char *path, char *list, size_t size)
55{ errno = ENOTSUP; return -1; }
56
57static inline ssize_t flistxattr (int filedes, char *list, size_t size)
58{ errno = ENOTSUP; return -1; }
59
60#endif