From 0838496c32fd49be90dca6aca835275c33ca828f Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki Date: Tue, 10 Dec 2024 09:00:48 +0100 Subject: [PATCH] Use MS_SYNCHRONOUS instead of MS_SYNC MS_SYNC is a flag for msync(2) while MS_SYNCHRONOUS is a flag for mount(2). The header used to define MS_SYNC but IMO this is confusing since that's an unrelated flag. Signed-off-by: Zygmunt Krynicki (cherry picked from commit d164e877f5fbd0d435c89c6645db9ea34061316d) Signed-off-by: John Johansen --- parser/mount.cc | 4 ++-- parser/mount.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/parser/mount.cc b/parser/mount.cc index f3b9c01a4..9b4e84ae2 100644 --- a/parser/mount.cc +++ b/parser/mount.cc @@ -247,8 +247,8 @@ static struct mnt_keyword_table mnt_opts_table[] = { {"nodev", MS_NODEV, 0}, {"exec", 0, MS_NOEXEC}, {"noexec", MS_NOEXEC, 0}, - {"sync", MS_SYNC, 0}, - {"async", 0, MS_SYNC}, + {"sync", MS_SYNCHRONOUS, 0}, + {"async", 0, MS_SYNCHRONOUS}, {"remount", MS_REMOUNT, 0}, {"mand", MS_MAND, 0}, {"nomand", 0, MS_MAND}, diff --git a/parser/mount.h b/parser/mount.h index e6bdd01b5..48d8e6b5c 100644 --- a/parser/mount.h +++ b/parser/mount.h @@ -35,7 +35,7 @@ #define MS_DEV 0 #define MS_NOEXEC (1 << 3) #define MS_EXEC 0 -#define MS_SYNC (1 << 4) +#define MS_SYNCHRONOUS (1 << 4) #define MS_ASYNC 0 #define MS_REMOUNT (1 << 5) #define MS_MAND (1 << 6) @@ -78,7 +78,7 @@ #define MS_RSHARED (MS_SHARED | MS_REC) #define MS_ALL_FLAGS (MS_RDONLY | MS_NOSUID | MS_NODEV | MS_NOEXEC | \ - MS_SYNC | MS_REMOUNT | MS_MAND | MS_DIRSYNC | \ + MS_SYNCHRONOUS | MS_REMOUNT | MS_MAND | MS_DIRSYNC | \ MS_NOSYMFOLLOW | \ MS_NOATIME | MS_NODIRATIME | MS_BIND | MS_RBIND | \ MS_MOVE | MS_VERBOSE | MS_ACL | \