iptables-restore: remove unused --binary flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 67f4e55f28abf2f666c0a0aa874d9421e91d6184
Author: Jan Engelhardt <jengelh@xxxxxxxxxx>
Date:   Wed Dec 24 20:30:47 2008 +0100

iptables-restore: remove unused --binary flag

Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx>
---
 ip6tables-restore.c |    7 +------
 iptables-restore.c  |    7 +------
 iptables-save.c     |   12 ++----------
 3 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/ip6tables-restore.c b/ip6tables-restore.c
index 01bccf7..0920760 100644
--- a/ip6tables-restore.c
+++ b/ip6tables-restore.c
@@ -26,11 +26,10 @@
 #define DEBUGP(x, args...)
 #endif
 
-static int binary = 0, counters = 0, verbose = 0, noflush = 0;
+static int counters = 0, verbose = 0, noflush = 0;
 
 /* Keeping track of external matches and targets.  */
 static const struct option options[] = {
-	{.name = "binary",   .has_arg = false, .val = 'b'},
 	{.name = "counters", .has_arg = false, .val = 'c'},
 	{.name = "verbose",  .has_arg = false, .val = 'v'},
 	{.name = "test",     .has_arg = false, .val = 't'},
@@ -45,7 +44,6 @@ 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 [-b] [-c] [-v] [-t] [-h]\n"
-			"	   [ --binary ]\n"
 			"	   [ --counters ]\n"
 			"	   [ --verbose ]\n"
 			"	   [ --test ]\n"
@@ -144,9 +142,6 @@ int main(int argc, char *argv[])
 
 	while ((c = getopt_long(argc, argv, "bcvthnM:", options, NULL)) != -1) {
 		switch (c) {
-			case 'b':
-				binary = 1;
-				break;
 			case 'c':
 				counters = 1;
 				break;
diff --git a/iptables-restore.c b/iptables-restore.c
index 4ea9306..04b83b4 100644
--- a/iptables-restore.c
+++ b/iptables-restore.c
@@ -23,11 +23,10 @@
 #define DEBUGP(x, args...)
 #endif
 
-static int binary = 0, counters = 0, verbose = 0, noflush = 0;
+static int counters = 0, verbose = 0, noflush = 0;
 
 /* Keeping track of external matches and targets.  */
 static const struct option options[] = {
-	{.name = "binary",   .has_arg = false, .val = 'b'},
 	{.name = "counters", .has_arg = false, .val = 'c'},
 	{.name = "verbose",  .has_arg = false, .val = 'v'},
 	{.name = "test",     .has_arg = false, .val = 't'},
@@ -43,7 +42,6 @@ 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 [-b] [-c] [-v] [-t] [-h]\n"
-			"	   [ --binary ]\n"
 			"	   [ --counters ]\n"
 			"	   [ --verbose ]\n"
 			"	   [ --test ]\n"
@@ -146,9 +144,6 @@ main(int argc, char *argv[])
 
 	while ((c = getopt_long(argc, argv, "bcvthnM:T:", options, NULL)) != -1) {
 		switch (c) {
-			case 'b':
-				binary = 1;
-				break;
 			case 'c':
 				counters = 1;
 				break;
diff --git a/iptables-save.c b/iptables-save.c
index 6252c0b..dce9185 100644
--- a/iptables-save.c
+++ b/iptables-save.c
@@ -21,10 +21,9 @@
 #include <dlfcn.h>
 #endif
 
-static int show_binary = 0, show_counters = 0;
+static int show_counters = 0;
 
 static const struct option options[] = {
-	{.name = "binary",   .has_arg = false, .val = 'b'},
 	{.name = "counters", .has_arg = false, .val = 'c'},
 	{.name = "dump",     .has_arg = false, .val = 'd'},
 	{.name = "table",    .has_arg = true,  .val = 't'},
@@ -70,7 +69,7 @@ static int do_output(const char *tablename)
 		exit_error(OTHER_PROBLEM, "Can't initialize: %s\n",
 			   iptc_strerror(errno));
 
-	if (!show_binary) {
+	{
 		time_t now = time(NULL);
 
 		printf("# Generated by iptables-save v%s on %s",
@@ -111,9 +110,6 @@ static int do_output(const char *tablename)
 		now = time(NULL);
 		printf("COMMIT\n");
 		printf("# Completed on %s", ctime(&now));
-	} else {
-		/* Binary, huh?  OK. */
-		exit_error(OTHER_PROBLEM, "Binary NYI\n");
 	}
 
 	iptc_free(h);
@@ -154,10 +150,6 @@ main(int argc, char *argv[])
 
 	while ((c = getopt_long(argc, argv, "bcdt:", options, NULL)) != -1) {
 		switch (c) {
-		case 'b':
-			show_binary = 1;
-			break;
-
 		case 'c':
 			show_counters = 1;
 			break;

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

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux