[iptables PATCH 09/13] ebtables: Pass struct iptables_command_state to print_help()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 iptables/xtables-eb.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c
index 9afaa614bac5b..017e1ad364840 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 @@ int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table,
 		ebt_print_error2("Bad table name");*/
 
 	if (command == 'h' && !(flags & OPT_ZERO)) {
-		print_help(cs.target, cs.matches, *table);
+		print_help(&cs);
 		ret = 1;
 	}
 
-- 
2.41.0





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux