From: Lennart Poettering Date: Fri, 24 Jun 2016 19:04:48 +0000 (+0200) Subject: fstab-generator: don't skip /usr handling if root handling didn't work correctly X-Git-Tag: v231~116^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=003cba39467a87bc2b530d311090b698fb08a993;p=thirdparty%2Fsystemd.git fstab-generator: don't skip /usr handling if root handling didn't work correctly Let's follow the same logic for all mounts here: log errors, and exit the process uncleanly ultimately, but do not skip further mounts if we encounter a problem with an earlier one. Fixes: #2344 --- diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 26fccbe3606..8688ae51c99 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -683,10 +683,15 @@ int main(int argc, char *argv[]) { /* Always honour root= and usr= in the kernel command line if we are in an initrd */ if (in_initrd()) { + int k; + r = add_sysroot_mount(); - if (r == 0) - r = add_sysroot_usr_mount(); - } + + k = add_sysroot_usr_mount(); + if (k < 0) + r = k; + } else + r = 0; /* Honour /etc/fstab only when that's enabled */ if (arg_fstab_enabled) {