summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-08-15 08:31:44 -0400
committerRich Felker <dalias@aerifal.cx>2012-08-15 08:31:44 -0400
commit7650390de8f72822ec0d4a9fb5b52efcf0be4698 (patch)
tree29b869a26cb56d1bec5065768bd25b5f837b9e0f
parent0d4d1a96e4fd827267250e469affc7ebfc44324f (diff)
downloadmusl-7650390de8f72822ec0d4a9fb5b52efcf0be4698.tar.gz
musl-7650390de8f72822ec0d4a9fb5b52efcf0be4698.tar.bz2
musl-7650390de8f72822ec0d4a9fb5b52efcf0be4698.tar.xz
musl-7650390de8f72822ec0d4a9fb5b52efcf0be4698.zip
add missing xattr functions
not sure why these were originally omitted..
-rw-r--r--include/sys/xattr.h3
-rw-r--r--src/linux/xattr.c15
2 files changed, 18 insertions, 0 deletions
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);
+}