[klibc] When using initrd in permanent mode, it still needs to be mounted...
When initrd is used in permanent mode (don't run /linuxrc, proceed
directly to /sbin/init) it still needs to be mounted at some point.
The code incorrectly bypassed both places that can happen...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
diff --git a/usr/kinit/initrd.c b/usr/kinit/initrd.c
index 2bc6c01..1371333 100644
--- a/usr/kinit/initrd.c
+++ b/usr/kinit/initrd.c
@@ -191,9 +191,9 @@
if (err)
fprintf(stderr, "%s: running linuxrc: %s\n", progname,
strerror(-err));
+ return 1; /* initrd is root, or run_linuxrc took care of it */
} else {
DEBUG(("kinit: permament (or pivoting) initrd, not running linuxrc\n"));
+ return 0; /* Mounting initrd as ordinary root */
}
-
- return 1; /* initrd is root, or run_linuxrc took care of it */
}