aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-06-05 14:00:43 -0700
committerH. Peter Anvin <hpa@zytor.com>2006-06-05 14:00:43 -0700
commitaf228dc4be432a0686784d3411fd255e6578191d (patch)
tree3e03a879f4a948b05a746414707cc98393de8e7f
parentcbd8a4b88273983a8f27abc81d03461714ab0735 (diff)
downloadklibc-af228dc4be432a0686784d3411fd255e6578191d.tar.gz
[klibc] When using initrd in permanent mode, it still needs to be mounted...klibc-1.3.27
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>
-rw-r--r--usr/kinit/initrd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/kinit/initrd.c b/usr/kinit/initrd.c
index 2bc6c016fb9f8..1371333e3f0a0 100644
--- a/usr/kinit/initrd.c
+++ b/usr/kinit/initrd.c
@@ -191,9 +191,9 @@ int initrd_load(int argc, char *argv[], dev_t root_dev)
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 */
}