aboutsummaryrefslogtreecommitdiff
path: root/coreutils/chroot.c
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-12 17:02:35 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-12 17:02:35 +0000
commit6a0c1de213cb8475ee435ff216f4037080926378 (patch)
tree088bc5b6e06d693ad8ca3eba078c0f3a8e302a24 /coreutils/chroot.c
parent7b40def2e7abcaa81d71d4bc7717d184c329eb2d (diff)
downloadbusybox-w32-6a0c1de213cb8475ee435ff216f4037080926378.tar.gz
busybox-w32-6a0c1de213cb8475ee435ff216f4037080926378.tar.bz2
busybox-w32-6a0c1de213cb8475ee435ff216f4037080926378.zip
Always report the applet name when doing error reporting.
git-svn-id: svn://busybox.net/trunk/busybox@831 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/chroot.c')
-rw-r--r--coreutils/chroot.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index 1c64e08a9..95aed3d17 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -47,8 +47,7 @@ int chroot_main(int argc, char **argv)
47 argv++; 47 argv++;
48 48
49 if (chroot(*argv) || (chdir("/"))) { 49 if (chroot(*argv) || (chdir("/"))) {
50 fatalError("chroot: cannot change root directory to %s: %s\n", 50 fatalError("cannot change root directory to %s: %s\n", *argv, strerror(errno));
51 *argv, strerror(errno));
52 } 51 }
53 52
54 argc--; 53 argc--;
@@ -62,8 +61,7 @@ int chroot_main(int argc, char **argv)
62 prog = "/bin/sh"; 61 prog = "/bin/sh";
63 execlp(prog, prog, NULL); 62 execlp(prog, prog, NULL);
64 } 63 }
65 fatalError("chroot: cannot execute %s: %s\n", 64 fatalError("cannot execute %s: %s\n", prog, strerror(errno));
66 prog, strerror(errno));
67 65
68} 66}
69 67