From: Peter Warasin <peter@endian.com>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH] iptables-restore: renames --test to --dry-run
Date: Wed, 07 Nov 2007 22:25:30 +0100 [thread overview]
Message-ID: <47322D4A.3090201@endian.com> (raw)
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;
}
next reply other threads:[~2007-11-07 21:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-07 21:25 Peter Warasin [this message]
2007-11-07 23:08 ` [PATCH] iptables-restore: renames --test to --dry-run 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47322D4A.3090201@endian.com \
--to=peter@endian.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).