Contents of /trunk/busybox/patches/busybox-1.20.2-support-strictatime-option.patch
Parent Directory | Revision Log
Revision 1855 -
(show annotations)
(download)
Thu Jul 26 09:00:17 2012 UTC (12 years, 2 months ago) by niro
File size: 1486 byte(s)
Thu Jul 26 09:00:17 2012 UTC (12 years, 2 months ago) by niro
File size: 1486 byte(s)
-added upstream patch
1 | From 9ad8979ff15e1b894ee1f4bb6a2535a1a2c20d65 Mon Sep 17 00:00:00 2001 |
2 | From: Denys Vlasenko <vda.linux@googlemail.com> |
3 | Date: Tue, 26 Jun 2012 14:09:00 +0000 |
4 | Subject: mount: support strictatime option. Closes 5240 |
5 | |
6 | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> |
7 | --- |
8 | diff --git a/util-linux/mount.c b/util-linux/mount.c |
9 | index b6c94d7..525fdcc 100644 |
10 | --- a/util-linux/mount.c |
11 | +++ b/util-linux/mount.c |
12 | @@ -113,6 +113,12 @@ |
13 | #ifndef MS_RELATIME |
14 | # define MS_RELATIME (1 << 21) |
15 | #endif |
16 | +#ifndef MS_STRICTATIME |
17 | +# define MS_STRICTATIME (1 << 24) |
18 | +#endif |
19 | + |
20 | +/* Any ~MS_FOO value has this bit set: */ |
21 | +#define BB_MS_INVERTED_VALUE (1u << 31) |
22 | |
23 | #include "libbb.h" |
24 | #if ENABLE_FEATURE_MOUNT_LABEL |
25 | @@ -240,6 +246,7 @@ static const int32_t mount_options[] = { |
26 | /* "nomand" */ ~MS_MANDLOCK, |
27 | /* "relatime" */ MS_RELATIME, |
28 | /* "norelatime" */ ~MS_RELATIME, |
29 | + /* "strictatime" */ MS_STRICTATIME, |
30 | /* "loud" */ ~MS_SILENT, |
31 | /* "rbind" */ MS_BIND|MS_RECURSIVE, |
32 | |
33 | @@ -297,6 +304,7 @@ static const char mount_option_str[] = |
34 | "nomand\0" |
35 | "relatime\0" |
36 | "norelatime\0" |
37 | + "strictatime\0" |
38 | "loud\0" |
39 | "rbind\0" |
40 | |
41 | @@ -473,7 +481,7 @@ static unsigned long parse_mount_options(char *options, char **unrecognized) |
42 | && (options[opt_len] == '\0' || options[opt_len] == '=') |
43 | ) { |
44 | unsigned long fl = mount_options[i]; |
45 | - if ((long)fl < 0) |
46 | + if (fl & BB_MS_INVERTED_VALUE) |
47 | flags &= fl; |
48 | else |
49 | flags |= fl; |
50 | -- |
51 | cgit v0.9.0.1-2-gef13 |