meta-opendreambox: stop using PRINC
[opendreambox.git] / meta-opendreambox / recipes-core / busybox / busybox-1.20.2 / 0004-mount-support-strictatime-option.-Closes-5240.patch
1 From 6c1e6c93dc2c2236fba550789c2da9f53994115a Mon Sep 17 00:00:00 2001
2 From: Denys Vlasenko <vda.linux@googlemail.com>
3 Date: Tue, 26 Jun 2012 16:09:00 +0200
4 Subject: [PATCH 4/9] mount: support strictatime option. Closes 5240
5
6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 ---
8  util-linux/mount.c |   10 +++++++++-
9  1 file changed, 9 insertions(+), 1 deletion(-)
10
11 diff --git a/util-linux/mount.c b/util-linux/mount.c
12 index b6c94d7..525fdcc 100644
13 --- a/util-linux/mount.c
14 +++ b/util-linux/mount.c
15 @@ -113,6 +113,12 @@
16  #ifndef MS_RELATIME
17  # define MS_RELATIME    (1 << 21)
18  #endif
19 +#ifndef MS_STRICTATIME
20 +# define MS_STRICTATIME (1 << 24)
21 +#endif
22 +
23 +/* Any ~MS_FOO value has this bit set: */
24 +#define BB_MS_INVERTED_VALUE (1u << 31)
25  
26  #include "libbb.h"
27  #if ENABLE_FEATURE_MOUNT_LABEL
28 @@ -240,6 +246,7 @@ static const int32_t mount_options[] = {
29                 /* "nomand"      */ ~MS_MANDLOCK,
30                 /* "relatime"    */ MS_RELATIME,
31                 /* "norelatime"  */ ~MS_RELATIME,
32 +               /* "strictatime" */ MS_STRICTATIME,
33                 /* "loud"        */ ~MS_SILENT,
34                 /* "rbind"       */ MS_BIND|MS_RECURSIVE,
35  
36 @@ -297,6 +304,7 @@ static const char mount_option_str[] =
37                 "nomand\0"
38                 "relatime\0"
39                 "norelatime\0"
40 +               "strictatime\0"
41                 "loud\0"
42                 "rbind\0"
43  
44 @@ -473,7 +481,7 @@ static unsigned long parse_mount_options(char *options, char **unrecognized)
45                          && (options[opt_len] == '\0' || options[opt_len] == '=')
46                         ) {
47                                 unsigned long fl = mount_options[i];
48 -                               if ((long)fl < 0)
49 +                               if (fl & BB_MS_INVERTED_VALUE)
50                                         flags &= fl;
51                                 else
52                                         flags |= fl;
53 -- 
54 1.7.10.4
55