From ae49d8860d28d6630cb78b079067ee5611f97382 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Mon, 24 Oct 2016 21:17:54 -0700 Subject: [PATCH] Added debug logging to chmod --- lib/fuse.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/fuse.c b/lib/fuse.c index 692f9c5..ab5a593 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -2633,8 +2633,15 @@ int fuse_fs_chmod(struct fuse_fs *fs, const char *path, mode_t mode, struct fuse_file_info *fi) { fuse_get_context()->private_data = fs->user_data; - if (fs->op.chmod) + if (fs->op.chmod) { + if (fs->debug) { + char buf[10]; + fprintf(stderr, "chmod[%s] %s %llo\n", + file_info_string(fi, buf, sizeof(buf)), + path, (unsigned long long) mode); + } return fs->op.chmod(path, mode, fi); + } else return -ENOSYS; } -- 2.30.2