From 1b7d2b886265daa5527f487c1b6e86d006574ac4 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Fri, 8 Mar 2019 14:24:50 -0700 Subject: Document fuse_fsync_in.fsync_flags and remove magic numbers (#375) --- example/notify_inval_inode.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'example/notify_inval_inode.c') diff --git a/example/notify_inval_inode.c b/example/notify_inval_inode.c index 0cee6e6..cdea82d 100644 --- a/example/notify_inval_inode.c +++ b/example/notify_inval_inode.c @@ -76,10 +76,6 @@ timeout, so we just send a big value */ #define NO_TIMEOUT 500000 -/* We cannot check directly if e.g. O_RDONLY is set, since this is not - * an individual bit (cf. open(2)) */ -#define ACCESS_MASK (O_RDONLY | O_WRONLY | O_RDWR) - #define MAX_STR_LEN 128 #define FILE_INO 2 #define FILE_NAME "current_time" @@ -224,7 +220,7 @@ static void tfs_open(fuse_req_t req, fuse_ino_t ino, if (ino == FUSE_ROOT_ID) fuse_reply_err(req, EISDIR); - else if ((fi->flags & ACCESS_MASK) != O_RDONLY) + else if ((fi->flags & O_ACCMODE) != O_RDONLY) fuse_reply_err(req, EACCES); else if (ino == FILE_INO) fuse_reply_open(req, fi); -- cgit v1.2.3