[klibc] Patch for utils/run-init.c
Daniel Thaler
daniel at dthaler.de
Sun Oct 17 19:48:04 PDT 2004
Hello,
Currently run-init tries to do "chdir(argv[1])".
However, that fails if the commandline of run-init is "exec run-init -c
/dev/console ...".
Doing chdir(realroot) seems better.
Daniel Thaler
-------------- next part --------------
--- utils/run-init.c.old 2004-10-17 18:23:46.000000000 +0000
+++ utils/run-init.c 2004-10-17 18:24:13.000000000 +0000
@@ -188,7 +188,7 @@
initargs = argv+optind+1;
/* First, change to the new root directory */
- if ( chdir(argv[1]) )
+ if ( chdir(realroot) )
die("chdir to new root");
/* This is a potentially highly destructive program. Take some
More information about the klibc
mailing list