diff options
author | Wanlong Gao <gaowanlong@cn.fujitsu.com> | 2012-01-30 15:22:53 +0800 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-01-30 10:56:59 +0000 |
commit | d60d5c091f46dda8399ce2af1b6e5920bd5fb819 (patch) | |
tree | e3759eb3bd319053c8c001b59a4504e90531725f | |
parent | 0042898880167f93c5e64d76008ab07bd0aa9485 (diff) | |
download | libguestfs-d60d5c091f46dda8399ce2af1b6e5920bd5fb819.tar.gz libguestfs-d60d5c091f46dda8399ce2af1b6e5920bd5fb819.tar.xz libguestfs-d60d5c091f46dda8399ce2af1b6e5920bd5fb819.zip |
guestmount: use O_ACCMODE instead of hard coding
Change hard code 3 to O_ACCMODE.
it'll be more sensible.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
-rw-r--r-- | fuse/guestmount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fuse/guestmount.c b/fuse/guestmount.c index bd7ba504..a9bf4e33 100644 --- a/fuse/guestmount.c +++ b/fuse/guestmount.c @@ -583,7 +583,7 @@ fg_open (const char *path, struct fuse_file_info *fi) { TRACE_CALL ("%s, 0%o", path, fi->flags); - int flags = fi->flags & 3; + int flags = fi->flags & O_ACCMODE; if (read_only && flags != O_RDONLY) return -EROFS; |