netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* iptables-restore: remove unused --binary flag
@ 2008-12-24 19:32 Jan Engelhardt
  2008-12-24 19:32 ` iptables-save: restore indent after last change Jan Engelhardt
  2008-12-30 11:08 ` iptables-restore: remove unused --binary flag Pablo Neira Ayuso
  0 siblings, 2 replies; 8+ messages in thread
From: Jan Engelhardt @ 2008-12-24 19:32 UTC (permalink / raw)
  To: kaber; +Cc: Netfilter Developer Mailing List

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

iptables-restore: remove unused --binary flag

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 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;


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-01-22 19:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-24 19:32 iptables-restore: remove unused --binary flag Jan Engelhardt
2008-12-24 19:32 ` iptables-save: restore indent after last change Jan Engelhardt
2008-12-30 11:13   ` Pablo Neira Ayuso
2008-12-30 11:28     ` Jan Engelhardt
2008-12-30 11:08 ` iptables-restore: remove unused --binary flag Pablo Neira Ayuso
2009-01-19 20:20   ` Jan Engelhardt
2009-01-21  8:06     ` Patrick McHardy
2009-01-22 19:51       ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).