//usage: "Free initramfs and switch to another root fs:\n"
//usage: "chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,\n"
//usage: "execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.\n"
-//usage: "\nOptions:"
//usage: "\n -c DEV Reopen stdio to DEV after switch"
#include <sys/vfs.h>
}
xchroot(".");
// The chdir is needed to recalculate "." and ".." links
- xchdir("/");
+ /*xchdir("/"); - done in xchroot */
// If a new console specified, redirect stdin/stdout/stderr to it
if (console) {