On 10/2/20 3:26 AM, Johannes Berg wrote: > diff --git a/genl/ctrl.c b/genl/ctrl.c > index 68099fe97f1a..c62212b40fa3 100644 > --- a/genl/ctrl.c > +++ b/genl/ctrl.c > @@ -162,6 +162,16 @@ static int print_ctrl(struct rtnl_ctrl_data *ctrl, > __u32 *ma = RTA_DATA(tb[CTRL_ATTR_MAXATTR]); > fprintf(fp, " max attribs: %d ",*ma); > } > + if (tb[CTRL_ATTR_OP_POLICY]) { > + const struct rtattr *pos; > + > + rtattr_for_each_nested(pos, tb[CTRL_ATTR_OP_POLICY]) { > + __u32 *v = RTA_DATA(pos); > + > + fprintf(fp, " op %d has policy %d", > + pos->rta_type, *v);
did you look at pretty printing the op and type? I suspect only numbers are going to cause a lot of staring at header files while counting to decipher number to text.