aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2024-04-13 15:04:02 -0700
committerDavid Ahern <dsahern@kernel.org>2024-04-21 01:12:51 +0000
commit98b7262c121637326039085bbd198c10f059af7b (patch)
tree7479187418720e22c7a8bea20e0f46676819be83
parente7b4fcb2af8bfbb3c945f381a98293d62f490907 (diff)
downloadiproute2-next-98b7262c121637326039085bbd198c10f059af7b.tar.gz
tc/u32: remove FILE argument
The pretty printing routines no longer use the file handle. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David Ahern <dsahern@kernel.org>
-rw-r--r--tc/f_u32.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tc/f_u32.c b/tc/f_u32.c
index a06996363..df8d01e87 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -820,7 +820,7 @@ static int parse_hashkey(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
return 0;
}
-static void print_ipv4(FILE *f, const struct tc_u32_key *key)
+static void print_ipv4(const struct tc_u32_key *key)
{
char abuf[256];
@@ -895,7 +895,7 @@ static void print_ipv4(FILE *f, const struct tc_u32_key *key)
close_json_object();
}
-static void print_ipv6(FILE *f, const struct tc_u32_key *key)
+static void print_ipv6(const struct tc_u32_key *key)
{
char abuf[256];
@@ -971,7 +971,7 @@ static void print_ipv6(FILE *f, const struct tc_u32_key *key)
close_json_object();
}
-static void print_raw(FILE *f, const struct tc_u32_key *key)
+static void print_raw(const struct tc_u32_key *key)
{
open_json_object("match");
print_nl();
@@ -985,14 +985,14 @@ static void print_raw(FILE *f, const struct tc_u32_key *key)
static const struct {
__u16 proto;
__u16 pad;
- void (*pprinter)(FILE *f, const struct tc_u32_key *key);
+ void (*pprinter)(const struct tc_u32_key *key);
} u32_pprinters[] = {
{0, 0, print_raw},
{ETH_P_IP, 0, print_ipv4},
{ETH_P_IPV6, 0, print_ipv6},
};
-static void show_keys(FILE *f, const struct tc_u32_key *key)
+static void show_keys(const struct tc_u32_key *key)
{
int i = 0;
@@ -1002,7 +1002,7 @@ static void show_keys(FILE *f, const struct tc_u32_key *key)
for (i = 0; i < ARRAY_SIZE(u32_pprinters); i++) {
if (u32_pprinters[i].proto == ntohs(f_proto)) {
show_k:
- u32_pprinters[i].pprinter(f, key);
+ u32_pprinters[i].pprinter(key);
return;
}
}
@@ -1333,7 +1333,7 @@ static int u32_print_opt(const struct filter_util *qu, FILE *f, struct rtattr *o
int i;
for (i = 0; i < sel->nkeys; i++) {
- show_keys(f, sel->keys + i);
+ show_keys(sel->keys + i);
if (show_stats && NULL != pf)
print_u64(PRINT_ANY, "success", " (success %llu ) ",
pf->kcnts[i]);