Update contact info.
[oweals/busybox.git] / chroot.c
index f0a298104fc6d39c3806da358fcc6029467bd3cc..91d3407f2a37f6a5ee7e0470d68880af3be667da 100644 (file)
--- a/chroot.c
+++ b/chroot.c
@@ -38,7 +38,7 @@ int chroot_main(int argc, char **argv)
        argv++;
 
        if (chroot(*argv) || (chdir("/"))) {
-               fatalError("cannot change root directory to %s: %s\n", *argv, strerror(errno));
+               perror_msg_and_die("cannot change root directory to %s", *argv);
        }
 
        argc--;
@@ -54,10 +54,10 @@ int chroot_main(int argc, char **argv)
                execlp(prog, prog, NULL);
 #else
                shell_main(argc, argv);
-               exit (0);
+               return EXIT_SUCCESS;
 #endif
        }
-       fatalError("cannot execute %s: %s\n", prog, strerror(errno));
+       perror_msg_and_die("cannot execute %s", prog);
 
 }