[ostree-init] Move /dev and /run if mounted, rather than binding them
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree-init] Move /dev and /run if mounted, rather than binding them
- Date: Fri, 3 Feb 2012 22:30:44 +0000 (UTC)
commit 9205e4c087442a5f5a43b963fb65b23b7164c8e7
Author: Colin Walters <walters verbum org>
Date: Fri Feb 3 17:29:48 2012 -0500
Move /dev and /run if mounted, rather than binding them
There's no reason to keep them where they are.
src/ostree-init.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/ostree-init.c b/src/ostree-init.c
index 175e1aa..0fbd273 100644
--- a/src/ostree-init.c
+++ b/src/ostree-init.c
@@ -308,9 +308,9 @@ main(int argc, char *argv[])
{
snprintf (srcpath, sizeof(srcpath), "/dev");
snprintf (destpath, sizeof(destpath), "/ostree/%s/dev", ostree_root);
- if (mount (srcpath, destpath, NULL, MS_MGC_VAL|MS_BIND, NULL) < 0)
+ if (mount (srcpath, destpath, NULL, MS_MOVE, NULL) < 0)
{
- perrorv ("failed to bind mount %s to %s", srcpath, destpath);
+ perrorv ("failed to move mount of %s to %s", srcpath, destpath);
exit (1);
}
}
@@ -330,7 +330,7 @@ main(int argc, char *argv[])
{
snprintf (srcpath, sizeof(srcpath), "/run");
snprintf (destpath, sizeof(destpath), "/ostree/%s/run", ostree_root);
- if (mount (srcpath, destpath, NULL, MS_MGC_VAL|MS_BIND, NULL) < 0)
+ if (mount (srcpath, destpath, NULL, MS_MOVE, NULL) < 0)
{
perrorv ("failed to bind mount %s to %s", srcpath, destpath);
exit (1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]