summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormcbride <mcbride@openbsd.org>2004-03-07 08:49:05 +0000
committermcbride <mcbride@openbsd.org>2004-03-07 08:49:05 +0000
commitfb210867855686ea65953b7662c8d911733096b5 (patch)
treee2d48ae31e2996e95eb8512d15f332bcdce07819
parentDon't try to dereference null configuration. (diff)
downloadwireguard-openbsd-fb210867855686ea65953b7662c8d911733096b5.tar.xz
wireguard-openbsd-fb210867855686ea65953b7662c8d911733096b5.zip
Document -v in ifstated.8 and usage() and use __progname in usage().
Fix from merith at redmoon dot openbsd dot de, with slightly modified wording.
-rw-r--r--usr.sbin/ifstated/ifstated.86
-rw-r--r--usr.sbin/ifstated/ifstated.c7
2 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/ifstated/ifstated.8 b/usr.sbin/ifstated/ifstated.8
index fb080b700f1..04c54acc75d 100644
--- a/usr.sbin/ifstated/ifstated.8
+++ b/usr.sbin/ifstated/ifstated.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ifstated.8,v 1.2 2004/02/05 09:01:25 jmc Exp $
+.\" $OpenBSD: ifstated.8,v 1.3 2004/03/07 08:49:05 mcbride Exp $
.\"
.\" Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org>
.\"
@@ -23,7 +23,7 @@
.Sh SYNOPSIS
.Nm ifstated
.Bk -words
-.Op Fl dhin
+.Op Fl dhinv
.Op Fl D Ar macro=value
.Op Fl f Ar file
.Ek
@@ -65,6 +65,8 @@ Ignore initial interface states.
.It Fl n
Config test mode.
Check config validity, then exit.
+.It Fl v
+Verbose mode. Use twice to further increase verbosity.
.El
.Sh FILES
.Bl -tag -width "/etc/ifstated.conf" -compact
diff --git a/usr.sbin/ifstated/ifstated.c b/usr.sbin/ifstated/ifstated.c
index 9ffbc1c3f05..6aaf21381e6 100644
--- a/usr.sbin/ifstated/ifstated.c
+++ b/usr.sbin/ifstated/ifstated.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifstated.c,v 1.13 2004/03/07 08:37:49 mcbride Exp $ */
+/* $OpenBSD: ifstated.c,v 1.14 2004/03/07 08:49:05 mcbride Exp $ */
/*
* Copyright (c) 2004 Marco Pfatschbacher <mpf@openbsd.org>
@@ -80,7 +80,10 @@ void logit(int level, const char *fmt, ...);
void
usage(void)
{
- fprintf(stderr, "usage: ifstated [-dhinv] [-f config]\n");
+ extern char* __progname;
+
+ fprintf(stderr, "usage: %s [-dhinv] [-D macro=value] [-f config]\n",
+ __progname);
exit(1);
}