2018-06-13 1:06 GMT+02:00 Subash Abhinov Kasiviswanathan <subas...@codeaurora.org>: >> + >> +static void print_explain(FILE *f) >> +{ >> + fprintf(f, >> + "Usage: ... rmnet mux_id MUXID\n" >> + "\n" >> + "MUXID := 1-127\n" >> + ); >> +} > > > Hi Daniele > > This range can be from 1-254. > >> + >> +static void explain(void) >> +{ >> + print_explain(stderr); >> +} >> + >> +static int rmnet_parse_opt(struct link_util *lu, int argc, char **argv, >> + struct nlmsghdr *n) >> +{ >> + __u16 mux_id; >> + >> + while (argc > 0) { >> + if (matches(*argv, "mux_id") == 0) { >> + NEXT_ARG(); >> + if (get_u16(&mux_id, *argv, 0)) >> + invarg("mux_id is invalid", *argv); >> + addattr_l(n, 1024, IFLA_RMNET_MUX_ID, &mux_id, 2); > > > You could use addattr16() instead since it is __u16. >
Thanks Subash, I'll fix those in v2. Regards, Daniele > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, > a Linux Foundation Collaborative Project