Skip to contentSkip to conversation

iptables-restore: add missing arguments to usage message

PATCH Superseded Brian Haley 2 participants 3 messages Aug 22, 2016 – Aug 23, 2016 netfilter

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 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.

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);
 }
#1 lore raw
Quoted 11 lines · Brian Haley

iptables-restore was missing -n, -T and -M from the usage message, added them to match the man page.

iptables/ip6tables-restore.c +0 -0
index 9393924..dc0acb0 100644

iptables/ip6tables-restore.c static void print_usage(const char *name, const char *version) __attribute__((no · line 46

Quoted 5 lines
iptables/ip6tables-restore.c +1 -1
@@ -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"

Could you also propagate these changes to iptables/xtables-restore.c?

Thanks!

Quoted 36 lines
iptables/ip6tables-restore.c +2 -1
 			"	   [ --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 -3
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);
 }
--

To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 13 lines · Pablo Neira Ayuso
Quoted 12 lines · Brian Haley

iptables-restore was missing -n, -T and -M from the usage message, added them to match the man page.

iptables/ip6tables-restore.c +0 -0
index 9393924..dc0acb0 100644
@@ -43,13 +43,14 @@ static void print_usage(const char *name, const char *version) __attribute__((no
 
Quoted 6 lines

iptables/ip6tables-restore.c static void print_usage(const char *name, const char *version) __attribute__((no · line 46

Quoted 4 lines
iptables/ip6tables-restore.c +1 -1
 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"

Could you also propagate these changes to iptables/xtables-restore.c?

Sure, I'll send a v2.