summaryrefslogtreecommitdiff
path: root/ext2fs/ext2fs.h
diff options
context:
space:
mode:
authorShengyu Zhang <lastavengers@outlook.com>2016-05-13 09:18:59 +0800
committerJustus Winter <justus@gnupg.org>2016-11-10 15:31:02 +0100
commit1b38918eb7408501b9a370e98cb15613a7f3a2ad (patch)
tree865fed19bd7da68583c6fddc822c0c57cd0d4446 /ext2fs/ext2fs.h
parent345abeda66c8aa5cb4d121fc8455cbe8053b9db6 (diff)
ext2fs: Add support for xattr
* ext2fs/Makefile (SRCS): Add xattr.c. * ext2fs/ext2_fs.h: Define EXT2_FEATURE_COMPAT_EXT_ATTR. * ext2fs/ext2fs.h: Add xattr functions. * ext2fs/ialloc.c (diskfs_free_node): Free xattr block. * ext2fs/xattr.c: xattr implement. * ext2fs/xattr.h: Likewise.
Diffstat (limited to 'ext2fs/ext2fs.h')
-rw-r--r--ext2fs/ext2fs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h
index a3d22b28..76adf632 100644
--- a/ext2fs/ext2fs.h
+++ b/ext2fs/ext2fs.h
@@ -17,6 +17,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+#ifndef _EXT2FS_H
+#define _EXT2FS_H
+
#include <mach.h>
#include <hurd.h>
#include <hurd/ports.h>
@@ -575,3 +578,13 @@ extern void _ext2_panic (const char *, const char *, ...)
extern void ext2_warning (const char *, ...)
__attribute__ ((format (printf, 1, 2)));
+
+/* ---------------------------------------------------------------- */
+/* xattr.c */
+
+error_t ext2_list_xattr (struct node *np, char *buffer, int *len);
+error_t ext2_get_xattr (struct node *np, const char *name, char *value, int *len);
+error_t ext2_set_xattr (struct node *np, const char *name, const char *value, int len, int flags);
+error_t ext2_free_xattr_block (struct node *np);
+
+#endif