aboutsummaryrefslogtreecommitdiff
path: root/coreutils/chroot.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/chroot.c')
-rw-r--r--coreutils/chroot.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index 8ad680c02..62cfdc244 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -9,10 +9,6 @@
9 9
10/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ 10/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
11 11
12#include <stdlib.h>
13#include <stdio.h>
14#include <unistd.h>
15#include <errno.h>
16#include "busybox.h" 12#include "busybox.h"
17 13
18int chroot_main(int argc, char **argv) 14int chroot_main(int argc, char **argv)
@@ -25,7 +21,7 @@ int chroot_main(int argc, char **argv)
25 if (chroot(*argv)) { 21 if (chroot(*argv)) {
26 bb_perror_msg_and_die("cannot change root directory to %s", *argv); 22 bb_perror_msg_and_die("cannot change root directory to %s", *argv);
27 } 23 }
28 bb_xchdir("/"); 24 xchdir("/");
29 25
30 ++argv; 26 ++argv;
31 if (argc == 2) { 27 if (argc == 2) {