summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/sys/xattr.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibC/sys/xattr.h')
-rw-r--r--Userland/Libraries/LibC/sys/xattr.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/sys/xattr.h b/Userland/Libraries/LibC/sys/xattr.h
new file mode 100644
index 0000000000..8855225efc
--- /dev/null
+++ b/Userland/Libraries/LibC/sys/xattr.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2021, the SerenityOS developers
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <sys/types.h>
+
+__BEGIN_DECLS
+
+ssize_t getxattr(const char* path, const char* name, void* value, size_t size);
+ssize_t lgetxattr(const char* path, const char* name, void* value, size_t size);
+ssize_t fgetxattr(int fd, const char* name, void* value, size_t size);
+
+int setxattr(const char* path, const char* name, const void* value, size_t size, int flags);
+int lsetxattr(const char* path, const char* name, const void* value, size_t size, int flags);
+int fsetxattr(int fd, const char* name, const void* value, size_t size, int flags);
+
+ssize_t listxattr(const char* path, char* list, size_t size);
+ssize_t llistxattr(const char* path, char* list, size_t size);
+ssize_t flistxattr(int fd, char* list, size_t size);
+
+__END_DECLS