]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
chroot: quote argument in error diagnostic
authorPádraig Brady <P@draigBrady.com>
Fri, 26 Jun 2015 18:31:00 +0000 (19:31 +0100)
committerPádraig Brady <P@draigBrady.com>
Fri, 26 Jun 2015 18:35:46 +0000 (19:35 +0100)
* src/chroot.c (main): Quote the passed argument,
to avoid confusing error messages.

src/chroot.c

index f44cec51d4eaa4055b605b7c5e5a3a8bf001d836..42b4501780036088432007a6f5ce1853de4aea75 100644 (file)
@@ -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"));