diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-06 20:59:41 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-06 20:59:41 +0100 |
commit | 696c38ddca99f6d40ee6c4bd1d253a987989bd95 (patch) | |
tree | e86517845237426c10935bc03443541c1790cd11 | |
parent | b1eedfcfa1d2281b2e1b8773ab0130c5196b4505 (diff) | |
download | busybox-w32-696c38ddca99f6d40ee6c4bd1d253a987989bd95.tar.gz busybox-w32-696c38ddca99f6d40ee6c4bd1d253a987989bd95.tar.bz2 busybox-w32-696c38ddca99f6d40ee6c4bd1d253a987989bd95.zip |
mount: add -o nostrictatime and -o [no]lazytime
function old new delta
mount_option_str 345 379 +34
mount_options 176 188 +12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 46/0) Total: 46 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | util-linux/mount.c | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index 7625d8424..25d884a24 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -216,12 +216,16 @@ | |||
216 | #ifndef MS_SHARED | 216 | #ifndef MS_SHARED |
217 | # define MS_SHARED (1 << 20) | 217 | # define MS_SHARED (1 << 20) |
218 | #endif | 218 | #endif |
219 | |||
219 | #ifndef MS_RELATIME | 220 | #ifndef MS_RELATIME |
220 | # define MS_RELATIME (1 << 21) | 221 | # define MS_RELATIME (1 << 21) |
221 | #endif | 222 | #endif |
222 | #ifndef MS_STRICTATIME | 223 | #ifndef MS_STRICTATIME |
223 | # define MS_STRICTATIME (1 << 24) | 224 | # define MS_STRICTATIME (1 << 24) |
224 | #endif | 225 | #endif |
226 | #ifndef MS_LAZYTIME | ||
227 | # define MS_LAZYTIME (1 << 25) | ||
228 | #endif | ||
225 | 229 | ||
226 | /* Any ~MS_FOO value has this bit set: */ | 230 | /* Any ~MS_FOO value has this bit set: */ |
227 | #define BB_MS_INVERTED_VALUE (1u << 31) | 231 | #define BB_MS_INVERTED_VALUE (1u << 31) |
@@ -358,15 +362,18 @@ static const int32_t mount_options[] ALIGN4 = { | |||
358 | /* "noatime" */ MS_NOATIME, | 362 | /* "noatime" */ MS_NOATIME, |
359 | /* "diratime" */ ~MS_NODIRATIME, | 363 | /* "diratime" */ ~MS_NODIRATIME, |
360 | /* "nodiratime" */ MS_NODIRATIME, | 364 | /* "nodiratime" */ MS_NODIRATIME, |
361 | /* "mand" */ MS_MANDLOCK, | ||
362 | /* "nomand" */ ~MS_MANDLOCK, | ||
363 | /* "relatime" */ MS_RELATIME, | 365 | /* "relatime" */ MS_RELATIME, |
364 | /* "norelatime" */ ~MS_RELATIME, | 366 | /* "norelatime" */ ~MS_RELATIME, |
365 | /* "strictatime" */ MS_STRICTATIME, | 367 | /* "strictatime" */ MS_STRICTATIME, |
366 | /* "loud" */ ~MS_SILENT, | 368 | /* "nostrictatime"*/ ~MS_STRICTATIME, |
367 | /* "rbind" */ MS_BIND|MS_RECURSIVE, | 369 | /* "lazytime" */ MS_LAZYTIME, |
370 | /* "nolazytime" */ ~MS_LAZYTIME, | ||
371 | /* "mand" */ MS_MANDLOCK, | ||
372 | /* "nomand" */ ~MS_MANDLOCK, | ||
373 | /* "loud" */ ~MS_SILENT, | ||
368 | 374 | ||
369 | // action flags | 375 | // action flags |
376 | /* "rbind" */ MS_BIND|MS_RECURSIVE, | ||
370 | /* "union" */ MS_UNION, | 377 | /* "union" */ MS_UNION, |
371 | /* "bind" */ MS_BIND, | 378 | /* "bind" */ MS_BIND, |
372 | /* "move" */ MS_MOVE, | 379 | /* "move" */ MS_MOVE, |
@@ -404,28 +411,31 @@ static const char mount_option_str[] ALIGN1 = | |||
404 | ) | 411 | ) |
405 | IF_FEATURE_MOUNT_FLAGS( | 412 | IF_FEATURE_MOUNT_FLAGS( |
406 | // vfs flags | 413 | // vfs flags |
407 | "nosuid\0" | 414 | "nosuid" "\0" |
408 | "suid\0" | 415 | "suid" "\0" |
409 | "dev\0" | 416 | "dev" "\0" |
410 | "nodev\0" | 417 | "nodev" "\0" |
411 | "exec\0" | 418 | "exec" "\0" |
412 | "noexec\0" | 419 | "noexec" "\0" |
413 | "sync\0" | 420 | "sync" "\0" |
414 | "dirsync\0" | 421 | "dirsync" "\0" |
415 | "async\0" | 422 | "async" "\0" |
416 | "atime\0" | 423 | "atime" "\0" |
417 | "noatime\0" | 424 | "noatime" "\0" |
418 | "diratime\0" | 425 | "diratime" "\0" |
419 | "nodiratime\0" | 426 | "nodiratime" "\0" |
420 | "mand\0" | 427 | "relatime" "\0" |
421 | "nomand\0" | 428 | "norelatime" "\0" |
422 | "relatime\0" | 429 | "strictatime" "\0" |
423 | "norelatime\0" | 430 | "nostrictatime""\0" |
424 | "strictatime\0" | 431 | "lazytime" "\0" |
425 | "loud\0" | 432 | "nolazytime" "\0" |
426 | "rbind\0" | 433 | "mand" "\0" |
434 | "nomand" "\0" | ||
435 | "loud" "\0" | ||
427 | 436 | ||
428 | // action flags | 437 | // action flags |
438 | "rbind\0" | ||
429 | "union\0" | 439 | "union\0" |
430 | "bind\0" | 440 | "bind\0" |
431 | "move\0" | 441 | "move\0" |