diff options
| author | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-10-27 22:55:50 +0000 |
|---|---|---|
| committer | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-10-27 22:55:50 +0000 |
| commit | e9b8e427edbf1071f03d694f12afc6d61ad29bf4 (patch) | |
| tree | 1341f988aa02110b3a997edc52e54bcc27ea1000 /include | |
| parent | e90081f6ed71edd8cbfc579a627e377b3460a02e (diff) | |
| download | busybox-w32-e9b8e427edbf1071f03d694f12afc6d61ad29bf4.tar.gz busybox-w32-e9b8e427edbf1071f03d694f12afc6d61ad29bf4.tar.bz2 busybox-w32-e9b8e427edbf1071f03d694f12afc6d61ad29bf4.zip | |
Add a switch_root utility (like kconfig's utils/run_init.c, although not
actuall using any of that code). This is needed because pivot_root doesn't
work right under initramfs. (See the menuconfig help.)
git-svn-id: svn://busybox.net/trunk/busybox@11935 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'include')
| -rw-r--r-- | include/applets.h | 3 | ||||
| -rw-r--r-- | include/usage.h | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/applets.h b/include/applets.h index a814ce1b1..883e55990 100644 --- a/include/applets.h +++ b/include/applets.h | |||
| @@ -625,6 +625,9 @@ | |||
| 625 | #ifdef CONFIG_SWAPONOFF | 625 | #ifdef CONFIG_SWAPONOFF |
| 626 | APPLET(swapon, swap_on_off_main, _BB_DIR_SBIN, _BB_SUID_NEVER) | 626 | APPLET(swapon, swap_on_off_main, _BB_DIR_SBIN, _BB_SUID_NEVER) |
| 627 | #endif | 627 | #endif |
| 628 | #ifdef CONFIG_SWITCH_ROOT | ||
| 629 | APPLET(switch_root, switch_root_main, _BB_DIR_SBIN, _BB_SUID_NEVER) | ||
| 630 | #endif | ||
| 628 | #ifdef CONFIG_SYNC | 631 | #ifdef CONFIG_SYNC |
| 629 | APPLET(sync, sync_main, _BB_DIR_BIN, _BB_SUID_NEVER) | 632 | APPLET(sync, sync_main, _BB_DIR_BIN, _BB_SUID_NEVER) |
| 630 | #endif | 633 | #endif |
diff --git a/include/usage.h b/include/usage.h index bef6a4dd2..69c50b97b 100644 --- a/include/usage.h +++ b/include/usage.h | |||
| @@ -2735,6 +2735,12 @@ | |||
| 2735 | "Options:\n" \ | 2735 | "Options:\n" \ |
| 2736 | "\t-a\tStart swapping on all swap devices" | 2736 | "\t-a\tStart swapping on all swap devices" |
| 2737 | 2737 | ||
| 2738 | #define switch_root_trivial_usage \ | ||
| 2739 | "NEW_ROOT NEW_INIT [ARGUMENTS_TO_INIT]" | ||
| 2740 | #define switch_root_full_usage \ | ||
| 2741 | "Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,\n" \ | ||
| 2742 | "and exec NEW_INIT.\n" | ||
| 2743 | |||
| 2738 | #define sync_trivial_usage \ | 2744 | #define sync_trivial_usage \ |
| 2739 | "" | 2745 | "" |
| 2740 | #define sync_full_usage \ | 2746 | #define sync_full_usage \ |
