[LEDE-DEV] [PATCH 3/4] [RFC] fstools: block.c: Use <linux/fs.h> instead of defining mount flags ourselves

lede at daniel.thecshore.com lede at daniel.thecshore.com
Wed May 18 03:12:47 PDT 2016


From: Daniel Dickinson <lede at daniel.thecshore.com>

Let's use the cannonical source of mount flags instead of
defining the flags ourselves.

Signed-off-by: Daniel Dickinson <lede at daniel.thecshore.com>
---
 block.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/block.c b/block.c
index ef58665..d30b1f6 100644
--- a/block.c
+++ b/block.c
@@ -29,6 +29,8 @@
 #include <sys/mount.h>
 #include <sys/wait.h>
 
+#include <linux/fs.h>
+
 #include <uci.h>
 #include <uci_blob.h>
 
@@ -147,18 +149,6 @@ struct mount_flag {
 	int32_t flag;
 };
 
-#ifndef MS_DIRSYNC
-#	define MS_DIRSYNC		(1 << 7)
-#endif
-
-#ifndef MS_RELATIME
-#	define MS_RELATIME		(1 << 21)
-#endif
-
-#ifndef MS_STRICTATIME
-#	define MS_STRICTATIME	(1 << 24)
-#endif
-
 static const struct mount_flag mount_flags[] = {
 	{ "sync",		MS_SYNCHRONOUS	},
 	{ "async",		~MS_SYNCHRONOUS	},
-- 
1.9.1




More information about the Lede-dev mailing list