]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables-{save,restore}: warn that -b/--binary isn't implemented
authorJiri Popelka <jpopelka@redhat.com>
Fri, 14 Mar 2014 11:52:47 +0000 (12:52 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Mar 2014 11:47:42 +0000 (12:47 +0100)
see also 296dca39be

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/ip6tables-restore.c
iptables/ip6tables-save.c
iptables/iptables-restore.c
iptables/iptables-save.c
iptables/xtables-restore.c
iptables/xtables-save.c

index b8b9e0dd0abd1d7b64dfb60414fdde91b26a13c1..0f4dd97a2ac1543a8db56a2f75ac9b166bdd9080 100644 (file)
 #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'},
@@ -44,8 +43,7 @@ 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"
+       fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h]\n"
                        "          [ --counters ]\n"
                        "          [ --verbose ]\n"
                        "          [ --test ]\n"
@@ -207,7 +205,7 @@ int ip6tables_restore_main(int argc, char *argv[])
        while ((c = getopt_long(argc, argv, "bcvthnM:T:", options, NULL)) != -1) {
                switch (c) {
                        case 'b':
-                               binary = 1;
+                               fprintf(stderr, "-b/--binary option is not implemented\n");
                                break;
                        case 'c':
                                counters = 1;
index a86a64a3a9a8e349805a672e7ddad08efe445394..16821da83f39c5d7cb050ac95bd34ceab4079a35 100644 (file)
@@ -139,6 +139,9 @@ int ip6tables_save_main(int argc, char *argv[])
 
        while ((c = getopt_long(argc, argv, "bcdt:", options, NULL)) != -1) {
                switch (c) {
+               case 'b':
+                       fprintf(stderr, "-b/--binary option is not implemented\n");
+                       break;
                case 'c':
                        show_counters = 1;
                        break;
index 8c942ff618df64330b199d8729cdf240bcfbc3b3..261822ddee3d1c59f0dfbb91ddc15b722222a859 100644 (file)
 #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,8 +42,7 @@ 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"
+       fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h]\n"
                        "          [ --counters ]\n"
                        "          [ --verbose ]\n"
                        "          [ --test ]\n"
@@ -207,7 +205,7 @@ iptables_restore_main(int argc, char *argv[])
        while ((c = getopt_long(argc, argv, "bcvthnM:T:", options, NULL)) != -1) {
                switch (c) {
                        case 'b':
-                               binary = 1;
+                               fprintf(stderr, "-b/--binary option is not implemented\n");
                                break;
                        case 'c':
                                counters = 1;
index 2999c7f4ded856d44d747ecb0316fab3e0a8b1da..2c25b71fe265b666a64829de55cfe3972b6c87a4 100644 (file)
@@ -138,6 +138,9 @@ iptables_save_main(int argc, char *argv[])
 
        while ((c = getopt_long(argc, argv, "bcdt:", options, NULL)) != -1) {
                switch (c) {
+               case 'b':
+                       fprintf(stderr, "-b/--binary option is not implemented\n");
+                       break;
                case 'c':
                        show_counters = 1;
                        break;
index f7850bb21039b98e51c54a973ee0096e0e259898..3cb095fe8bf4cc5305cd481e1d6c48aa735a54fc 100644 (file)
 #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'},
@@ -47,8 +46,7 @@ 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"
+       fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h]\n"
                        "          [ --counters ]\n"
                        "          [ --verbose ]\n"
                        "          [ --test ]\n"
@@ -208,7 +206,7 @@ xtables_restore_main(int family, const char *progname, int argc, char *argv[])
        while ((c = getopt_long(argc, argv, "bcvthnM:T:46", options, NULL)) != -1) {
                switch (c) {
                        case 'b':
-                               binary = 1;
+                               fprintf(stderr, "-b/--binary option is not implemented\n");
                                break;
                        case 'c':
                                counters = 1;
index 42d2907165108ec5f8ad772a7b968625c449424b..fe77283ef4c74cf7766d1f910fb0057ab06fd77d 100644 (file)
@@ -106,6 +106,9 @@ xtables_save_main(int family, const char *progname, int argc, char *argv[])
 
        while ((c = getopt_long(argc, argv, "bcdt:46", options, NULL)) != -1) {
                switch (c) {
+               case 'b':
+                       fprintf(stderr, "-b/--binary option is not implemented\n");
+                       break;
                case 'c':
                        show_counters = true;
                        break;