Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/util-linux/switch_root.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/util-linux/switch_root.c
r2725 r3232 6 6 * Licensed under GPLv2, see file LICENSE in this source tree. 7 7 */ 8 9 //usage:#define switch_root_trivial_usage 10 //usage: "[-c /dev/console] NEW_ROOT NEW_INIT [ARGS]" 11 //usage:#define switch_root_full_usage "\n\n" 12 //usage: "Free initramfs and switch to another root fs:\n" 13 //usage: "chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,\n" 14 //usage: "execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.\n" 15 //usage: "\n -c DEV Reopen stdio to DEV after switch" 16 8 17 #include <sys/vfs.h> 9 18 #include <sys/mount.h> … … 106 115 xchroot("."); 107 116 // The chdir is needed to recalculate "." and ".." links 108 xchdir("/");117 /*xchdir("/"); - done in xchroot */ 109 118 110 119 // If a new console specified, redirect stdin/stdout/stderr to it
Note:
See TracChangeset
for help on using the changeset viewer.