diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-07-23 16:39:44 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-07-23 16:39:44 -0400 |
commit | 207460d09742304941f1a010a89fc2efa46bcb29 (patch) | |
tree | 69f53d2669c7877e8d0c4fb298a8f64ca543dd40 /src | |
parent | 42f0e965c42d7611e7a02718bffb1a8ffba74488 (diff) | |
download | musl-207460d09742304941f1a010a89fc2efa46bcb29.tar.gz musl-207460d09742304941f1a010a89fc2efa46bcb29.tar.bz2 musl-207460d09742304941f1a010a89fc2efa46bcb29.tar.xz musl-207460d09742304941f1a010a89fc2efa46bcb29.zip |
add extended attributes syscalls
based on patch by orc and Isaac Dunham, with some fixes.
Diffstat (limited to 'src')
-rw-r--r-- | src/linux/xattr.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/linux/xattr.c b/src/linux/xattr.c new file mode 100644 index 00000000..a66ab827 --- /dev/null +++ b/src/linux/xattr.c @@ -0,0 +1,47 @@ +#include <sys/xattr.h> +#include "syscall.h" + +ssize_t getxattr(const char *path, const char *name, void *value, size_t size) +{ + return syscall(SYS_getxattr, path, name, value, size); +} + +ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) +{ + return syscall(SYS_lgetxattr, path, name, value, size); +} + +ssize_t fgetxattr(int filedes, const char *name, void *value, size_t size) +{ + return syscall(SYS_fgetxattr, filedes, name, value, size); +} + +ssize_t listxattr(const char *path, char *list, size_t size) +{ + return syscall(SYS_listxattr, path, list, size); +} + +ssize_t llistxattr(const char *path, char *list, size_t size) +{ + return syscall(SYS_llistxattr, path, list, size); +} + +ssize_t flistxattr(int filedes, char *list, size_t size) +{ + return syscall(SYS_flistxattr, filedes, list, size); +} + +int setxattr(const char *path, const char *name, const void *value, size_t size, int flags) +{ + return syscall(SYS_setxattr, path, name, value, size, flags); +} + +int lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags) +{ + return syscall(SYS_lsetxattr, path, name, value, size, flags); +} + +int fsetxattr(int filedes, const char *name, const void *value, size_t size, int flags) +{ + return syscall(SYS_fsetxattr, filedes, name, value, size, flags); +} |