From a618f28ce12e97bfffea729bdf421c38a236f9ca Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Mon, 16 Sep 2002 02:46:41 +0000 Subject: 2002-09-16 Marcus Brinkmann * opts-std-startup.c (parse_startup_opt): Use argp_error instead argp_usage for error. Replace case for ARGP_KEY_END with case for ARGP_KEY_NO_ARGS. --- libcons/opts-std-startup.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libcons/opts-std-startup.c') diff --git a/libcons/opts-std-startup.c b/libcons/opts-std-startup.c index 8bb2d73e..2490737d 100644 --- a/libcons/opts-std-startup.c +++ b/libcons/opts-std-startup.c @@ -84,15 +84,12 @@ parse_startup_opt (int opt, char *arg, struct argp_state *state) case ARGP_KEY_ARG: if (state->arg_num > 0) /* Too many arguments. */ - argp_usage (state); - + argp_error (state, "Too many non option arguments"); _cons_file = arg; break; - case ARGP_KEY_END: - if (state->arg_num != 1) - /* Not enough arguments. */ - argp_usage (state); + case ARGP_KEY_NO_ARGS: + argp_error (state, "Filename of console server missing"); break; default: -- cgit v1.2.3