tc/util: remove unused argument from print_action_control
The FILE handle is no longer used. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
committed by
David Ahern
parent
bf4022ebe6
commit
2c42df8689
@@ -191,7 +191,7 @@ static int bpf_print_opt(const struct action_util *au, FILE *f, struct rtattr *a
|
||||
b, sizeof(b)));
|
||||
}
|
||||
|
||||
print_action_control(f, "default-action ", parm->action, _SL_);
|
||||
print_action_control("default-action ", parm->action, _SL_);
|
||||
print_uint(PRINT_ANY, "index", "\t index %u", parm->index);
|
||||
print_int(PRINT_ANY, "ref", " ref %d", parm->refcnt);
|
||||
print_int(PRINT_ANY, "bind", " bind %d", parm->bindcnt);
|
||||
|
||||
@@ -112,7 +112,7 @@ static int print_connmark(const struct action_util *au, FILE *f, struct rtattr *
|
||||
ci = RTA_DATA(tb[TCA_CONNMARK_PARMS]);
|
||||
|
||||
print_uint(PRINT_ANY, "zone", "zone %u", ci->zone);
|
||||
print_action_control(f, " ", ci->action, "");
|
||||
print_action_control(" ", ci->action, "");
|
||||
|
||||
print_nl();
|
||||
print_uint(PRINT_ANY, "index", "\t index %u", ci->index);
|
||||
|
||||
@@ -204,7 +204,7 @@ print_csum(const struct action_util *au, FILE *f, struct rtattr *arg)
|
||||
uflag_4, uflag_5, uflag_6, uflag_7);
|
||||
print_string(PRINT_ANY, "csum", "(%s) ", buf);
|
||||
|
||||
print_action_control(f, "action ", sel->action, _SL_);
|
||||
print_action_control("action ", sel->action, _SL_);
|
||||
print_uint(PRINT_ANY, "index", "\tindex %u", sel->index);
|
||||
print_int(PRINT_ANY, "ref", " ref %d", sel->refcnt);
|
||||
print_int(PRINT_ANY, "bind", " bind %d", sel->bindcnt);
|
||||
|
||||
@@ -523,7 +523,7 @@ static int print_ct(const struct action_util *au, FILE *f, struct rtattr *arg)
|
||||
ct_print_helper(tb[TCA_CT_HELPER_FAMILY], tb[TCA_CT_HELPER_PROTO], tb[TCA_CT_HELPER_NAME]);
|
||||
ct_print_nat(ct_action, tb);
|
||||
|
||||
print_action_control(f, " ", p->action, "");
|
||||
print_action_control(" ", p->action, "");
|
||||
|
||||
print_nl();
|
||||
print_uint(PRINT_ANY, "index", "\t index %u", p->index);
|
||||
|
||||
@@ -236,7 +236,7 @@ static int print_ctinfo(const struct action_util *au, FILE *f, struct rtattr *ar
|
||||
zone = rta_getattr_u16(tb[TCA_CTINFO_ZONE]);
|
||||
|
||||
print_hu(PRINT_ANY, "zone", "zone %u", zone);
|
||||
print_action_control(f, " ", ci->action, "");
|
||||
print_action_control(" ", ci->action, "");
|
||||
|
||||
print_nl();
|
||||
print_uint(PRINT_ANY, "index", "\t index %u", ci->index);
|
||||
|
||||
@@ -178,7 +178,7 @@ print_gact(const struct action_util *au, FILE *f, struct rtattr *arg)
|
||||
}
|
||||
p = RTA_DATA(tb[TCA_GACT_PARMS]);
|
||||
|
||||
print_action_control(f, "action ", p->action, "");
|
||||
print_action_control("action ", p->action, "");
|
||||
#ifdef CONFIG_GACT_PROB
|
||||
if (tb[TCA_GACT_PROB] != NULL) {
|
||||
pp = RTA_DATA(tb[TCA_GACT_PROB]);
|
||||
@@ -191,7 +191,7 @@ print_gact(const struct action_util *au, FILE *f, struct rtattr *arg)
|
||||
print_nl();
|
||||
print_string(PRINT_ANY, "random_type", "\t random type %s",
|
||||
prob_n2a(pp->ptype));
|
||||
print_action_control(f, " ", pp->paction, " ");
|
||||
print_action_control(" ", pp->paction, " ");
|
||||
print_int(PRINT_ANY, "val", "val %d", pp->pval);
|
||||
close_json_object();
|
||||
#endif
|
||||
|
||||
@@ -517,7 +517,7 @@ static int print_gate(const struct action_util *au, FILE *f, struct rtattr *arg)
|
||||
if (tb[TCA_GATE_ENTRY_LIST])
|
||||
print_gate_list(tb[TCA_GATE_ENTRY_LIST]);
|
||||
|
||||
print_action_control(f, "\t", parm->action, "");
|
||||
print_action_control("\t", parm->action, "");
|
||||
|
||||
print_uint(PRINT_ANY, "index", "\n\t index %u", parm->index);
|
||||
print_int(PRINT_ANY, "ref", " ref %d", parm->refcnt);
|
||||
|
||||
@@ -236,7 +236,7 @@ static int print_ife(const struct action_util *au, FILE *f, struct rtattr *arg)
|
||||
|
||||
print_string(PRINT_ANY, "mode", "%s ",
|
||||
p->flags & IFE_ENCODE ? "encode" : "decode");
|
||||
print_action_control(f, "action ", p->action, " ");
|
||||
print_action_control("action ", p->action, " ");
|
||||
|
||||
if (tb[TCA_IFE_TYPE]) {
|
||||
ife_type = rta_getattr_u16(tb[TCA_IFE_TYPE]);
|
||||
|
||||
@@ -337,7 +337,7 @@ print_mirred(const struct action_util *au, FILE *f, struct rtattr *arg)
|
||||
print_string(PRINT_ANY, "to_dev", " to device %s)", dev);
|
||||
}
|
||||
|
||||
print_action_control(f, " ", p->action, "");
|
||||
print_action_control(" ", p->action, "");
|
||||
|
||||
print_nl();
|
||||
print_uint(PRINT_ANY, "index", "\tindex %u", p->index);
|
||||
|
||||
@@ -272,7 +272,7 @@ static int print_mpls(const struct action_util *au, FILE *f, struct rtattr *arg)
|
||||
}
|
||||
break;
|
||||
}
|
||||
print_action_control(f, " ", parm->action, "");
|
||||
print_action_control(" ", parm->action, "");
|
||||
|
||||
print_nl();
|
||||
print_uint(PRINT_ANY, "index", "\t index %u", parm->index);
|
||||
|
||||
@@ -169,7 +169,7 @@ print_nat(const struct action_util *au, FILE * f, struct rtattr *arg)
|
||||
print_string(PRINT_ANY, "new_addr", " %s",
|
||||
format_host_r(AF_INET, 4, &sel->new_addr, buf1, sizeof(buf1)));
|
||||
|
||||
print_action_control(f, " ", sel->action, "");
|
||||
print_action_control(" ", sel->action, "");
|
||||
print_nl();
|
||||
print_uint(PRINT_ANY, "index", "\t index %u", sel->index);
|
||||
print_int(PRINT_ANY, "ref", " ref %d", sel->refcnt);
|
||||
|
||||
@@ -791,7 +791,7 @@ static int print_pedit(const struct action_util *au, FILE *f, struct rtattr *arg
|
||||
}
|
||||
}
|
||||
|
||||
print_action_control(f, "action ", sel->action, " ");
|
||||
print_action_control("action ", sel->action, " ");
|
||||
print_uint(PRINT_ANY, "nkeys", "keys %d\n", sel->nkeys);
|
||||
print_uint(PRINT_ANY, "index", " \t index %u", sel->index);
|
||||
print_int(PRINT_ANY, "ref", " ref %d", sel->refcnt);
|
||||
|
||||
@@ -325,12 +325,12 @@ static int print_police(const struct action_util *a, FILE *f, struct rtattr *arg
|
||||
print_u64(PRINT_ANY, "pkts_burst", "pkts_burst %llu ", ppsburst64);
|
||||
}
|
||||
|
||||
print_action_control(f, "action ", p->action, "");
|
||||
print_action_control("action ", p->action, "");
|
||||
|
||||
if (tb[TCA_POLICE_RESULT]) {
|
||||
__u32 action = rta_getattr_u32(tb[TCA_POLICE_RESULT]);
|
||||
|
||||
print_action_control(f, "/", action, " ");
|
||||
print_action_control("/", action, " ");
|
||||
} else {
|
||||
print_string(PRINT_FP, NULL, " ", NULL);
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ static int print_sample(const struct action_util *au, FILE *f, struct rtattr *ar
|
||||
print_uint(PRINT_ANY, "trunc_size", " trunc_size %u",
|
||||
rta_getattr_u32(tb[TCA_SAMPLE_TRUNC_SIZE]));
|
||||
|
||||
print_action_control(f, " ", p->action, "");
|
||||
print_action_control(" ", p->action, "");
|
||||
|
||||
print_nl();
|
||||
print_uint(PRINT_ANY, "index", "\t index %u", p->index);
|
||||
|
||||
@@ -239,7 +239,7 @@ static int print_skbedit(const struct action_util *au, FILE *f, struct rtattr *a
|
||||
"inheritdsfield");
|
||||
}
|
||||
|
||||
print_action_control(f, " ", p->action, "");
|
||||
print_action_control(" ", p->action, "");
|
||||
|
||||
print_nl();
|
||||
print_uint(PRINT_ANY, "index", "\t index %u", p->index);
|
||||
|
||||
@@ -178,7 +178,7 @@ static int print_skbmod(const struct action_util *au, FILE *f, struct rtattr *ar
|
||||
p = RTA_DATA(tb[TCA_SKBMOD_PARMS]);
|
||||
|
||||
print_string(PRINT_FP, NULL, "skbmod ", NULL);
|
||||
print_action_control(f, "", p->action, " ");
|
||||
print_action_control("", p->action, " ");
|
||||
|
||||
if (tb[TCA_SKBMOD_ETYPE]) {
|
||||
skbmod_etype = rta_getattr_u16(tb[TCA_SKBMOD_ETYPE]);
|
||||
|
||||
@@ -731,7 +731,7 @@ static int print_tunnel_key(const struct action_util *au, FILE *f, struct rtattr
|
||||
tb[TCA_TUNNEL_KEY_ENC_TTL]);
|
||||
break;
|
||||
}
|
||||
print_action_control(f, " ", parm->action, "");
|
||||
print_action_control(" ", parm->action, "");
|
||||
|
||||
print_nl();
|
||||
print_uint(PRINT_ANY, "index", "\t index %u", parm->index);
|
||||
|
||||
@@ -282,7 +282,7 @@ static int print_vlan(const struct action_util *au, FILE *f, struct rtattr *arg)
|
||||
print_string(PRINT_ANY, "src_mac", " src_mac %s", b1);
|
||||
}
|
||||
}
|
||||
print_action_control(f, " ", parm->action, "");
|
||||
print_action_control(" ", parm->action, "");
|
||||
|
||||
print_nl();
|
||||
print_uint(PRINT_ANY, "index", "\t index %u", parm->index);
|
||||
|
||||
@@ -534,8 +534,7 @@ int parse_action_control_slash(int *argc_p, char ***argv_p,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void print_action_control(FILE *f, const char *prefix,
|
||||
int action, const char *suffix)
|
||||
void print_action_control(const char *prefix, int action, const char *suffix)
|
||||
{
|
||||
print_string(PRINT_FP, NULL, "%s", prefix);
|
||||
open_json_object("control_action");
|
||||
|
||||
@@ -109,8 +109,7 @@ void parse_action_control_dflt(int *argc_p, char ***argv_p,
|
||||
int default_result);
|
||||
int parse_action_control_slash(int *argc_p, char ***argv_p,
|
||||
int *result1_p, int *result2_p, bool allow_num);
|
||||
void print_action_control(FILE *f, const char *prefix,
|
||||
int action, const char *suffix);
|
||||
void print_action_control(const char *prefix, int action, const char *suffix);
|
||||
int police_print_xstats(const struct action_util *a, FILE *f, struct rtattr *tb);
|
||||
int tc_print_action(FILE *f, const struct rtattr *tb, unsigned short tot_acts);
|
||||
int parse_action(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n);
|
||||
|
||||
Reference in New Issue
Block a user