block: respect mount flags for /overlay
authorJo-Philipp Wich <jo@mein.io>
Mon, 25 Apr 2016 15:49:38 +0000 (17:49 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 25 Apr 2016 15:50:34 +0000 (17:50 +0200)
Instead of hardcoding no-flags in the mount syscall, use the user configured
values, this is useful when mounting external overlays with "sync" or "ro"
flags.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
block.c

diff --git a/block.c b/block.c
index c6d1b9049145a453205372b93016572b4c332d4a..2d44a8a59885d63310092c179902c406b2ba353b 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1101,7 +1101,8 @@ static int mount_extroot(char *cfg)
                if (check_fs)
                        check_filesystem(pr);
 
-               err = mount(pr->dev, path, pr->id->name, 0, (m->options) ? (m->options) : (""));
+               err = mount(pr->dev, path, pr->id->name, m->flags,
+                           (m->options) ? (m->options) : (""));
 
                if (err) {
                        ULOG_ERR("extroot: mounting %s (%s) on %s failed: %d (%s)\n",