summaryrefslogtreecommitdiff
path: root/src/chroot.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2010-03-26 07:42:01 +0000
committerPádraig Brady <P@draigBrady.com>2010-03-26 14:31:16 +0000
commitb4f9559537144a7158064ca67b7a4305f1c459df (patch)
treedeb118ad51e950708800defa04f977e191422cf8 /src/chroot.c
parent88d4b3461e3eeb69e1d09e89f38050abd6b81402 (diff)
downloadcoreutils-b4f9559537144a7158064ca67b7a4305f1c459df.tar.xz
nice,chroot: use more standard option parsing
Related to the 2010-03-25 commit, 88d4b346, "timeout: use more standard option parsing". * src/nice.c (main): Don't use parse_long_options() which is a helper for commands that don't have any long options specific to them. * src/chroot.c (main): Likewise. * tests/misc/nice-fail: Remove a case that now passes due to us accepting multiple instances of the --help and --version options. * tests/misc/chroot-fail: Likewise.
Diffstat (limited to 'src/chroot.c')
-rw-r--r--src/chroot.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/chroot.c b/src/chroot.c
index f8066074c..0eb60c088 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -24,7 +24,6 @@
#include "system.h"
#include "error.h"
-#include "long-options.h"
#include "quote.h"
#include "userspec.h"
#include "xstrtol.h"
@@ -162,9 +161,6 @@ main (int argc, char **argv)
initialize_exit_failure (EXIT_CANCELED);
atexit (close_stdout);
- parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE_NAME, Version,
- usage, AUTHORS, (char const *) NULL);
-
while ((c = getopt_long (argc, argv, "+", long_opts, NULL)) != -1)
{
switch (c)
@@ -172,9 +168,15 @@ main (int argc, char **argv)
case USERSPEC:
userspec = optarg;
break;
+
case GROUPS:
groups = optarg;
break;
+
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (EXIT_CANCELED);
}