rpm2cpio: handle bz2 too; code shrink
[oweals/busybox.git] / coreutils / chroot.c
index a3e70e9250466e2337234e674a67e88176086608..9b3d700444cd47749142029b0d5ad298b518e376 100644 (file)
@@ -19,9 +19,7 @@ int chroot_main(int argc, char **argv)
        }
 
        ++argv;
-       if (chroot(*argv)) {
-               bb_perror_msg_and_die("cannot change root directory to %s", *argv);
-       }
+       xchroot(*argv);
        xchdir("/");
 
        ++argv;
@@ -35,5 +33,5 @@ int chroot_main(int argc, char **argv)
        }
 
        BB_EXECVP(*argv, argv);
-       bb_perror_msg_and_die("cannot execute %s", *argv);
+       bb_perror_msg_and_die("can't execute '%s'", *argv);
 }