From bd8985945b5a1c35b7baa71571b1b61807ad7514 Mon Sep 17 00:00:00 2001 From: amitgeron Date: Sun, 17 Dec 2023 19:45:47 +0200 Subject: Allow *xattr operations on root directory (ino 1) --- example/hello_ll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'example/hello_ll.c') diff --git a/example/hello_ll.c b/example/hello_ll.c index 0299ffb..803528d 100644 --- a/example/hello_ll.c +++ b/example/hello_ll.c @@ -157,7 +157,7 @@ static void hello_ll_getxattr(fuse_req_t req, fuse_ino_t ino, const char *name, size_t size) { (void)size; - assert(ino == 2); + assert(ino == 1 || ino == 2); if (strcmp(name, "hello_ll_getxattr_name") == 0) { const char *buf = "hello_ll_getxattr_value"; @@ -174,7 +174,7 @@ static void hello_ll_setxattr(fuse_req_t req, fuse_ino_t ino, const char *name, { (void)flags; (void)size; - assert(ino == 2); + assert(ino == 1 || ino == 2); const char* exp_val = "hello_ll_setxattr_value"; if (strcmp(name, "hello_ll_setxattr_name") == 0 && strlen(exp_val) == size && @@ -190,7 +190,7 @@ static void hello_ll_setxattr(fuse_req_t req, fuse_ino_t ino, const char *name, static void hello_ll_removexattr(fuse_req_t req, fuse_ino_t ino, const char *name) { - assert(ino == 2); + assert(ino == 1 || ino == 2); if (strcmp(name, "hello_ll_removexattr_name") == 0) { fuse_reply_err(req, 0); -- cgit v1.2.3