summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-06-26 19:31:00 +0100
committerPádraig Brady <P@draigBrady.com>2015-06-26 19:35:46 +0100
commite0c5ca485c9a5f016650f2c78e4d2edb6e44b2bb (patch)
treee1fc7634770ac8e68fbeeeeccfccc9024e3a36ed /src
parentf3a0e9ebb26d92368238f6700fa973198c563968 (diff)
downloadcoreutils-e0c5ca485c9a5f016650f2c78e4d2edb6e44b2bb.tar.xz
chroot: quote argument in error diagnostic
* src/chroot.c (main): Quote the passed argument, to avoid confusing error messages.
Diffstat (limited to 'src')
-rw-r--r--src/chroot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chroot.c b/src/chroot.c
index f44cec51d..42b450178 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -327,7 +327,7 @@ main (int argc, char **argv)
if (chroot (newroot) != 0)
error (EXIT_CANCELED, errno, _("cannot change root directory to %s"),
- newroot);
+ quote (newroot));
if (! skip_chdir && chdir ("/"))
error (EXIT_CANCELED, errno, _("cannot chdir to root directory"));