Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/blacklist/bin make usage print the wrong option
details: https://anonhg.NetBSD.org/src/rev/be757ea37e5f
branches: trunk
changeset: 805841:be757ea37e5f
user: christos <christos%NetBSD.org@localhost>
date: Wed Jan 21 21:24:51 2015 +0000
description:
make usage print the wrong option
diffstat:
external/bsd/blacklist/bin/blacklistd.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r b16d63c3a0a9 -r be757ea37e5f external/bsd/blacklist/bin/blacklistd.c
--- a/external/bsd/blacklist/bin/blacklistd.c Wed Jan 21 21:24:35 2015 +0000
+++ b/external/bsd/blacklist/bin/blacklistd.c Wed Jan 21 21:24:51 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: blacklistd.c,v 1.8 2015/01/21 19:45:26 christos Exp $ */
+/* $NetBSD: blacklistd.c,v 1.9 2015/01/21 21:24:51 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: blacklistd.c,v 1.8 2015/01/21 19:45:26 christos Exp $");
+__RCSID("$NetBSD: blacklistd.c,v 1.9 2015/01/21 21:24:51 christos Exp $");
#include <sys/types.h>
#include <sys/socket.h>
@@ -102,8 +102,9 @@
}
static __dead void
-usage(void)
+usage(int c)
{
+ warnx("Unknown option `%c'", (char)c);
fprintf(stderr, "Usage: %s [-df] [-c <config>] [-r <rulename>] "
"[-s <sockpath>] [-C <controlprog>] [-D <dbfile>] [-t <timeout>]\n",
getprogname());
@@ -273,7 +274,7 @@
tout = atoi(optarg) * 1000;
break;
default:
- usage();
+ usage(c);
}
}
Home |
Main Index |
Thread Index |
Old Index