netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iptables-restore: renames --test to --dry-run
@ 2007-11-07 21:25 Peter Warasin
  2007-11-07 23:08 ` Hervé Eychenne
  2007-11-08  9:44 ` Amin Azez
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Warasin @ 2007-11-07 21:25 UTC (permalink / raw)
  To: netfilter-devel

Hi

The following patch renames the option --test (-t) to --dry-run (-d)
in order to free the letter 't' for --table, which makes the options
more consistent regarding the other *tables tools, where -t is always
--table.

peter

--- patch begins here ---
renames --test (-t) to --dry-run (-d) and -T (--table) to -t
adds missing short options to usage message

Signed-off-by: Peter Warasin <peter@endian.com>
---
Index: iptables-restore.c
===================================================================
--- iptables-restore.c.orig	2007-11-07 21:57:45.000000000 +0100
+++ iptables-restore.c	2007-11-07 22:09:12.000000000 +0100
@@ -29,11 +29,11 @@
 	{ "binary", 0, 0, 'b' },
 	{ "counters", 0, 0, 'c' },
 	{ "verbose", 0, 0, 'v' },
-	{ "test", 0, 0, 't' },
+	{ "dry-run", 0, 0, 'd' },
 	{ "help", 0, 0, 'h' },
 	{ "noflush", 0, 0, 'n'},
 	{ "modprobe", 1, 0, 'M'},
-	{ "table", 1, 0, 'T'},
+	{ "table", 1, 0, 't'},
 	{ 0 }
 };

@@ -41,11 +41,11 @@

 static void print_usage(const char *name, const char *version)
 {
-	fprintf(stderr, "Usage: %s [-b] [-c] [-v] [-t] [-h]\n"
+	fprintf(stderr, "Usage: %s [-b] [-c] [-v] [-d] [-h] [-n] [-t] [-M]\n"
 			"	   [ --binary ]\n"
 			"	   [ --counters ]\n"
 			"	   [ --verbose ]\n"
-			"	   [ --test ]\n"
+			"	   [ --dry-run ]\n"
 			"	   [ --help ]\n"
 			"	   [ --noflush ]\n"
 			"	   [ --table=<TABLE> ]\n"
@@ -139,7 +139,7 @@
 	init_extensions();
 #endif

-	while ((c = getopt_long(argc, argv, "bcvthnM:T:", options, NULL)) != -1) {
+	while ((c = getopt_long(argc, argv, "bcvdhnM:t:", options, NULL)) != -1) {
 		switch (c) {
 			case 'b':
 				binary = 1;
@@ -150,7 +150,7 @@
 			case 'v':
 				verbose = 1;
 				break;
-			case 't':
+			case 'd':
 				testing = 1;
 				break;
 			case 'h':
@@ -163,7 +163,7 @@
 			case 'M':
 				modprobe = optarg;
 				break;
-			case 'T':
+			case 't':
 				tablename = optarg;
 				break;
 		}


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

end of thread, other threads:[~2007-11-08 10:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-07 21:25 [PATCH] iptables-restore: renames --test to --dry-run Peter Warasin
2007-11-07 23:08 ` Hervé Eychenne
2007-11-07 23:26   ` Patrick McHardy
2007-11-08  9:02   ` Jan Engelhardt
2007-11-08  9:16     ` Herve Eychenne
2007-11-08 10:07     ` Peter Warasin
2007-11-08 10:26       ` Herve Eychenne
2007-11-08  9:44 ` Amin Azez

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