From 7650390de8f72822ec0d4a9fb5b52efcf0be4698 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 15 Aug 2012 08:31:44 -0400 Subject: [PATCH] add missing xattr functions not sure why these were originally omitted.. --- include/sys/xattr.h | 3 +++ src/linux/xattr.c | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/include/sys/xattr.h b/include/sys/xattr.h index 2801cb85..f926493c 100644 --- a/include/sys/xattr.h +++ b/include/sys/xattr.h @@ -20,6 +20,9 @@ ssize_t flistxattr(int filedes, char *, size_t); int setxattr(const char *, const char *, const void *, size_t, int); int lsetxattr(const char *, const char *, const void *, size_t, int); int fsetxattr(int, const char *, const void *, size_t, int); +int removexattr(const char *, const char *); +int lremovexattr(const char *, const char *); +int fremovexattr(int, const char *); #ifdef __cplusplus } diff --git a/src/linux/xattr.c b/src/linux/xattr.c index a66ab827..fea0d209 100644 --- a/src/linux/xattr.c +++ b/src/linux/xattr.c @@ -45,3 +45,18 @@ int fsetxattr(int filedes, const char *name, const void *value, size_t size, int { return syscall(SYS_fsetxattr, filedes, name, value, size, flags); } + +int removexattr(const char *path, const char *name) +{ + return syscall(SYS_removexattr, path, name); +} + +int lremovexattr(const char *path, const char *name) +{ + return syscall(SYS_lremovexattr, path, name); +} + +int fremovexattr(int fd, const char *name) +{ + return syscall(SYS_fremovexattr, fd, name); +} -- 2.25.1