diff options
author | Karel Zak | 2012-01-16 12:29:27 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-16 12:29:27 +0100 |
commit | 07a67e6805aa92d98371ea6badaa2f879125358d (patch) | |
tree | 5775c90817d793fe1d749e5bb3e1a9d21ee5a782 /libmount/src/context_umount.c | |
parent | libmount: add post-mount checks to detect ro/rw (diff) | |
download | kernel-qcow2-util-linux-07a67e6805aa92d98371ea6badaa2f879125358d.tar.gz kernel-qcow2-util-linux-07a67e6805aa92d98371ea6badaa2f879125358d.tar.xz kernel-qcow2-util-linux-07a67e6805aa92d98371ea6badaa2f879125358d.zip |
libmount: fix MS_BIND|MS_REC usage, improve some bitwise operations
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_umount.c')
-rw-r--r-- | libmount/src/context_umount.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c index 9d7701f6e..939f66e7f 100644 --- a/libmount/src/context_umount.c +++ b/libmount/src/context_umount.c @@ -307,8 +307,7 @@ static int evaluate_permissions(struct libmnt_context *cxt) * Check user=<username> setting from mtab if there is user, owner or * group option in /etc/fstab */ - if ((u_flags & MNT_MS_USER) || (u_flags & MNT_MS_OWNER) || - (u_flags & MNT_MS_GROUP)) { + if (u_flags & (MNT_MS_USER | MNT_MS_OWNER | MNT_MS_GROUP)) { char *curr_user = NULL; char *mtab_user = NULL; @@ -670,7 +669,8 @@ int mnt_context_do_umount(struct libmnt_context *cxt) return rc; if ((cxt->flags & MNT_FL_RDONLY_UMOUNT) && - (cxt->mountflags & (MS_RDONLY | MS_REMOUNT))) { + (cxt->mountflags & (MS_RDONLY | MS_REMOUNT)) + == (MS_RDONLY | MS_REMOUNT)) { /* * fix options, remount --> read-only mount */ |