Some more patchelttes from Larry Doolittle.
[oweals/busybox.git] / chroot.c
index bae9cd75702288f662db639518f287bc2556ea30..f2d9b4d00b4d50103f6fe3d9a76960d9fd5fc06b 100644 (file)
--- a/chroot.c
+++ b/chroot.c
@@ -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
        }