aboutsummaryrefslogtreecommitdiffstats
path: root/example/notify_store_retrieve.c
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2019-03-08 14:24:50 -0700
committerNikolaus Rath <Nikolaus@rath.org>2019-03-08 21:24:50 +0000
commit1b7d2b886265daa5527f487c1b6e86d006574ac4 (patch)
tree2c936ff4a30e660b93e0399e40689e478ed0758e /example/notify_store_retrieve.c
parent06a31dece06792fd70fe2b4353f65df02f13549e (diff)
downloadlibfuse-1b7d2b886265daa5527f487c1b6e86d006574ac4.tar.gz
Document fuse_fsync_in.fsync_flags and remove magic numbers (#375)
Diffstat (limited to 'example/notify_store_retrieve.c')
-rw-r--r--example/notify_store_retrieve.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/example/notify_store_retrieve.c b/example/notify_store_retrieve.c
index 8fd81ff..56cb8b7 100644
--- a/example/notify_store_retrieve.c
+++ b/example/notify_store_retrieve.c
@@ -75,10 +75,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"
@@ -227,7 +223,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);