Module Name: src
Committed By: riastradh
Date: Thu Aug 20 21:31:26 UTC 2020
Modified Files:
src/usr.sbin/wgconfig: wgconfig.c
Log Message:
Make `wgconfig --help' and variations work.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/wgconfig/wgconfig.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/wgconfig/wgconfig.c
diff -u src/usr.sbin/wgconfig/wgconfig.c:1.1 src/usr.sbin/wgconfig/wgconfig.c:1.2
--- src/usr.sbin/wgconfig/wgconfig.c:1.1 Thu Aug 20 21:28:02 2020
+++ src/usr.sbin/wgconfig/wgconfig.c Thu Aug 20 21:31:26 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: wgconfig.c,v 1.1 2020/08/20 21:28:02 riastradh Exp $ */
+/* $NetBSD: wgconfig.c,v 1.2 2020/08/20 21:31:26 riastradh Exp $ */
/*
* Copyright (C) Ryota Ozaki <[email protected]>
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: wgconfig.c,v 1.1 2020/08/20 21:28:02 riastradh Exp $");
+__RCSID("$NetBSD: wgconfig.c,v 1.2 2020/08/20 21:31:26 riastradh Exp $");
#include <sys/ioctl.h>
@@ -729,7 +729,10 @@ main(int argc, char *argv[])
const char *command;
const char *target;
- if (argc < 2) {
+ if (argc < 2 ||
+ strcmp(argv[1], "-h") == 0 ||
+ strcmp(argv[1], "-?") == 0 ||
+ strcmp(argv[1], "--help") == 0) {
usage();
}