Skip to contentSkip to conversation

iptables-restore: add missing arguments to usage message

PATCH Applied Brian Haley 2 participants 2 messages Aug 23, 2016 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 iptables-restore: add missing arguments to usage message

iptables-restore was missing -n, -T and -M from the usage message, added them to match the man page. Cleaned-up other *restore files as well.

iptables/ip6tables-restore.c +3 -2
index 9393924..dc0acb0 100644
@@ -43,13 +43,14 @@ static void print_usage(const char *name, const char *version) __attribute__((no
 
 static void print_usage(const char *name, const char *version)
 {
-	fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h]\n"
+	fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h] [-n] [-T table] [-M command]\n"
 			"	   [ --counters ]\n"
 			"	   [ --verbose ]\n"
 			"	   [ --test ]\n"
 			"	   [ --help ]\n"
 			"	   [ --noflush ]\n"
-			"          [ --modprobe=<command>]\n", name);
+			"	   [ --table=<TABLE> ]\n"
+			"          [ --modprobe=<command> ]\n", name);
 
 	exit(1);
 }
iptables/iptables-restore.c +2 -2
index 638b171..2f1522d 100644
@@ -42,14 +42,14 @@ static void print_usage(const char *name, const char *version) __attribute__((no
 
 static void print_usage(const char *name, const char *version)
 {
-	fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h]\n"
+	fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h] [-n] [-T table] [-M command]\n"
 			"	   [ --counters ]\n"
 			"	   [ --verbose ]\n"
 			"	   [ --test ]\n"
 			"	   [ --help ]\n"
 			"	   [ --noflush ]\n"
 			"	   [ --table=<TABLE> ]\n"
-			"          [ --modprobe=<command>]\n", name);
+			"          [ --modprobe=<command> ]\n", name);
 
 	exit(1);
 }
iptables/xtables-restore.c +4 -2
index cb60cce..a551c8c 100644
@@ -46,14 +46,16 @@ static void print_usage(const char *name, const char *version) __attribute__((no
 
 static void print_usage(const char *name, const char *version)
 {
-	fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h]\n"
+	fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h] [-n] [-T table] [-M command] [-4] [-6]\n"
 			"	   [ --counters ]\n"
 			"	   [ --verbose ]\n"
 			"	   [ --test ]\n"
 			"	   [ --help ]\n"
 			"	   [ --noflush ]\n"
 			"	   [ --table=<TABLE> ]\n"
-			"          [ --modprobe=<command>]\n", name);
+			"          [ --modprobe=<command> ]\n"
+			"	   [ --ipv4 ]\n"
+			"	   [ --ipv6 ]\n", name);
 
 	exit(1);
 }
maintainer Applied
#1 lore raw
Quoted 4 lines · Brian Haley

iptables-restore was missing -n, -T and -M from the usage message, added them to match the man page. Cleaned-up other *restore files as well.

Applied, thanks.