summaryrefslogtreecommitdiffstats
path: root/src/basic/xattr-util.h
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-02-13 21:49:38 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-02-14 12:51:38 +0100
commita4d2461c46f40c9ae5002a2aea35b35ccb60ef9c (patch)
tree11cc559ccd988887c7da16fe6ce76a424ccf6a39 /src/basic/xattr-util.h
parentboot: Ensure raise() is not dropped by LTO (diff)
downloadsystemd-a4d2461c46f40c9ae5002a2aea35b35ccb60ef9c.tar.xz
systemd-a4d2461c46f40c9ae5002a2aea35b35ccb60ef9c.zip
xattr-util: Add xsetxattr()
Like getxattr_malloc() but for setxattr() and friends.
Diffstat (limited to '')
-rw-r--r--src/basic/xattr-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/xattr-util.h b/src/basic/xattr-util.h
index 0eb745a7a3..649a842fe2 100644
--- a/src/basic/xattr-util.h
+++ b/src/basic/xattr-util.h
@@ -36,3 +36,5 @@ static inline int llistxattr_malloc(const char *path, char **ret) {
static inline int flistxattr_malloc(int fd, char **ret) {
return listxattr_at_malloc(fd, NULL, AT_EMPTY_PATH, ret);
}
+
+int xsetxattr(int fd, const char *path, const char *name, const char *value, size_t size, int flags);