aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util-linux/mount.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index b6c94d7ba..525fdcce9 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -113,6 +113,12 @@
113#ifndef MS_RELATIME 113#ifndef MS_RELATIME
114# define MS_RELATIME (1 << 21) 114# define MS_RELATIME (1 << 21)
115#endif 115#endif
116#ifndef MS_STRICTATIME
117# define MS_STRICTATIME (1 << 24)
118#endif
119
120/* Any ~MS_FOO value has this bit set: */
121#define BB_MS_INVERTED_VALUE (1u << 31)
116 122
117#include "libbb.h" 123#include "libbb.h"
118#if ENABLE_FEATURE_MOUNT_LABEL 124#if ENABLE_FEATURE_MOUNT_LABEL
@@ -240,6 +246,7 @@ static const int32_t mount_options[] = {
240 /* "nomand" */ ~MS_MANDLOCK, 246 /* "nomand" */ ~MS_MANDLOCK,
241 /* "relatime" */ MS_RELATIME, 247 /* "relatime" */ MS_RELATIME,
242 /* "norelatime" */ ~MS_RELATIME, 248 /* "norelatime" */ ~MS_RELATIME,
249 /* "strictatime" */ MS_STRICTATIME,
243 /* "loud" */ ~MS_SILENT, 250 /* "loud" */ ~MS_SILENT,
244 /* "rbind" */ MS_BIND|MS_RECURSIVE, 251 /* "rbind" */ MS_BIND|MS_RECURSIVE,
245 252
@@ -297,6 +304,7 @@ static const char mount_option_str[] =
297 "nomand\0" 304 "nomand\0"
298 "relatime\0" 305 "relatime\0"
299 "norelatime\0" 306 "norelatime\0"
307 "strictatime\0"
300 "loud\0" 308 "loud\0"
301 "rbind\0" 309 "rbind\0"
302 310
@@ -473,7 +481,7 @@ static unsigned long parse_mount_options(char *options, char **unrecognized)
473 && (options[opt_len] == '\0' || options[opt_len] == '=') 481 && (options[opt_len] == '\0' || options[opt_len] == '=')
474 ) { 482 ) {
475 unsigned long fl = mount_options[i]; 483 unsigned long fl = mount_options[i];
476 if ((long)fl < 0) 484 if (fl & BB_MS_INVERTED_VALUE)
477 flags &= fl; 485 flags &= fl;
478 else 486 else
479 flags |= fl; 487 flags |= fl;