diff options
author | Phil Sutter <phil@nwl.cc> | 2023-11-24 19:14:23 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2023-12-05 16:35:37 +0100 |
commit | e48eecc13b855c50261a7b37f3d7f9670ef653d4 (patch) | |
tree | 4f8d3a21124f183a9bf8479b4dad077701d16aae /iptables/xtables-eb.c | |
parent | 79de02f8c20222adb5e837b074b1ce14d9c40189 (diff) |
ebtables: Pass struct iptables_command_state to print_help()
Parameters passed by the sole caller came from there already, apart from
'table' which is not used (ebtables-nft does not have per-table help
texts).
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xtables-eb.c')
-rw-r--r-- | iptables/xtables-eb.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c index 9afaa614..017e1ad3 100644 --- a/iptables/xtables-eb.c +++ b/iptables/xtables-eb.c @@ -303,9 +303,11 @@ static struct option *merge_options(struct option *oldopts, return merge; } -static void print_help(const struct xtables_target *t, - const struct xtables_rule_match *m, const char *table) +static void print_help(struct iptables_command_state *cs) { + const struct xtables_rule_match *m = cs->matches; + struct xtables_target *t = cs->target; + printf("%s %s\n", prog_name, prog_vers); printf( "Usage:\n" @@ -354,9 +356,6 @@ static void print_help(const struct xtables_target *t, printf("\n"); t->help(); } - -// if (table->help) -// table->help(ebt_hooknames); } /* Execute command L */ @@ -1144,7 +1143,7 @@ print_zero: ebt_print_error2("Bad table name");*/ if (command == 'h' && !(flags & OPT_ZERO)) { - print_help(cs.target, cs.matches, *table); + print_help(&cs); ret = 1; } |