Remove debugging statement.
[oweals/busybox.git] / chroot.c
index e6f1d034bc5db9aa11bf72758508b551a1f3136f..f2d9b4d00b4d50103f6fe3d9a76960d9fd5fc06b 100644 (file)
--- a/chroot.c
+++ b/chroot.c
@@ -3,7 +3,7 @@
  * Mini chroot implementation for busybox
  *
  *
- * Copyright (C) 1999,2000 by Lineo, inc.
+ * Copyright (C) 1999,2000,2001 by Lineo, inc.
  * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
  *
  * This program is free software; you can redistribute it and/or modify
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <errno.h>
+#include "busybox.h"
 
 int chroot_main(int argc, char **argv)
 {
        char *prog;
 
        if ((argc < 2) || (**(argv + 1) == '-')) {
-               usage(chroot_usage);
+               show_usage();
        }
        argc--;
        argv++;
@@ -54,7 +54,10 @@ int chroot_main(int argc, char **argv)
                        prog = "/bin/sh";
                execlp(prog, prog, NULL);
 #else
-               shell_main(argc, argv);
+               char shell[] = "/bin/sh";
+               char *shell_argv[2] = { shell, NULL };
+               applet_name = shell;
+               shell_main(1, shell_argv);
                return EXIT_SUCCESS;
 #endif
        }