summaryrefslogtreecommitdiff
path: root/src/chroot.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-06-17 13:09:21 +0000
committerJim Meyering <jim@meyering.net>2004-06-17 13:09:21 +0000
commit7870fa108121ddc3d4aa3ae252250040638a4f42 (patch)
treeeaa413ac4214f5b6462e24b68323c00697e61d65 /src/chroot.c
parent417a1e5850fcff8b6beed66b5b7e2da3de88e325 (diff)
downloadcoreutils-7870fa108121ddc3d4aa3ae252250040638a4f42.tar.xz
(main): Handle "--".
Diffstat (limited to 'src/chroot.c')
-rw-r--r--src/chroot.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/chroot.c b/src/chroot.c
index 5a28e32c4..3d196af6e 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -75,6 +75,15 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
+
+ /* The above handles --help and --version.
+ Since there is no other invocation of getopt, handle `--' here. */
+ if (1 < argc && STREQ (argv[1], "--"))
+ {
+ --argc;
+ ++argv;
+ }
+
if (argc <= 1)
{
error (0, 0, _("too few arguments"));