summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcons/ChangeLog6
-rw-r--r--libcons/opts-std-startup.c9
2 files changed, 9 insertions, 6 deletions
diff --git a/libcons/ChangeLog b/libcons/ChangeLog
index 8a79e6ff..a6b30aff 100644
--- a/libcons/ChangeLog
+++ b/libcons/ChangeLog
@@ -1,3 +1,9 @@
+2002-09-16 Marcus Brinkmann <marcus@gnu.org>
+
+ * 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.
+
2002-09-14 Marcus Brinkmann <marcus@gnu.org>
* Makefile (SRCS): Add vcons-input.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: