2009-01-10 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@gnu.org>
Sun, 11 Jan 2009 04:32:05 +0000 (04:32 +0000)
committerRoland McGrath <roland@gnu.org>
Sun, 11 Jan 2009 04:32:05 +0000 (04:32 +0000)
* nscd/nscd.c (parse_opt): Use argp_error for bad -i argument.

nscd/nscd.c

index 08bf1f1..1129cf8 100644 (file)
@@ -338,7 +338,10 @@ parse_opt (int key, char *arg, struct argp_state *state)
              break;
 
          if (cnt == lastdb)
-           return ARGP_ERR_UNKNOWN;
+           {
+             argp_error (state, _("'%s' is not a known database"), arg);
+             return EINVAL;
+           }
 
          size_t arg_len = strlen (arg) + 1;
          struct