summaryrefslogtreecommitdiff
path: root/src/chroot.c
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-01-08 06:33:16 -0700
committerEric Blake <ebb9@byu.net>2009-01-08 07:57:36 -0700
commita99c35b04d9ab601e4fa98319c56fbdbde6b420a (patch)
tree264804f0a32ce73b8444dbbcced994058c758d1e /src/chroot.c
parent5e3a5ae5193e0b14abd3d3428b1546bd15a20a8b (diff)
downloadcoreutils-a99c35b04d9ab601e4fa98319c56fbdbde6b420a.tar.xz
option handling: make exceptions more consistent
* doc/coreutils.texi (Common options): Not all utilities reject option abbreviations. * src/chroot.c (main): Report correct name on failure. * src/echo.c (usage): Clarify long option usage. * src/setuidgid.c (usage): Likewise. * src/hostid.c (usage): Condense.
Diffstat (limited to 'src/chroot.c')
-rw-r--r--src/chroot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/chroot.c b/src/chroot.c
index 1eb443c24..6d3fddf77 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -1,5 +1,5 @@
/* chroot -- run command or shell with special root directory
- Copyright (C) 95, 96, 1997, 1999-2004, 2007-2008
+ Copyright (C) 95, 96, 1997, 1999-2004, 2007-2009
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -83,7 +83,8 @@ main (int argc, char **argv)
}
if (chroot (argv[optind]) != 0)
- error (EXIT_FAILURE, errno, _("cannot change root directory to %s"), argv[1]);
+ error (EXIT_FAILURE, errno, _("cannot change root directory to %s"),
+ argv[optind]);
if (chdir ("/"))
error (EXIT_FAILURE, errno, _("cannot chdir to root directory"));