X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Ffstab-generator%2Ffstab-generator.c;h=9db4123530096f5d3be656d7f4ba22a75026234f;hb=3f8ee7918207d7128d4edbc20a1e81f4c6e1110e;hp=f3ecc24be62e864a67c15d7ea0fa112a7867c95a;hpb=d0aa9ce51915f6f7448adfeb4be0f46cc1356124;p=elogind.git diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index f3ecc24be..9db412353 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -33,6 +33,7 @@ #include "special.h" #include "mkdir.h" #include "virt.h" +#include "fileio.h" static const char *arg_dest = "/tmp"; static bool arg_enabled = true; @@ -177,7 +178,9 @@ static bool mount_is_bind(struct mntent *me) { return hasmntopt(me, "bind") || - streq(me->mnt_type, "bind"); + streq(me->mnt_type, "bind") || + hasmntopt(me, "rbind") || + streq(me->mnt_type, "rbind"); } static bool mount_is_network(struct mntent *me) { @@ -451,8 +454,8 @@ static int parse_new_root_from_proc_cmdline(void) { if (!opts || !type) return log_oom(); - /* root= and roofstype= may occur more than once, the last instance should take precedence. - * In the case of multiple rootflags= the arguments should be concatenated */ + /* root= and roofstype= may occur more than once, the last instance should take precedence. + * In the case of multiple rootflags= the arguments should be concatenated */ FOREACH_WORD_QUOTED(w, l, line, state) { char *word, *tmp_word; @@ -494,8 +497,8 @@ static int parse_new_root_from_proc_cmdline(void) { if (what) { - log_debug("Found entry what=%s where=/new_root type=%s", what, type); - r = add_mount(what, "/new_root", type, opts, 0, wait, false, false, + log_debug("Found entry what=%s where=/sysroot type=%s", what, type); + r = add_mount(what, "/sysroot", type, opts, 0, wait, false, false, false, false, false, "/proc/cmdline"); if (r < 0)