Re: [PATCH 4/7] iplink_can: add the "restricted" option
From: Stephen Hemminger
Date: Sat Nov 29 2025 - 12:03:28 EST
On Sat, 29 Nov 2025 16:29:09 +0100
Vincent Mailhol <mailhol@xxxxxxxxxx> wrote:
> @@ -257,6 +259,9 @@ static int can_parse_opt(struct link_util *lu, int argc, char **argv,
> invarg("\"tdc-mode\" must be either of \"auto\", \"manual\" or \"off\"",
> *argv);
> }
> + } else if (matches(*argv, "restricted") == 0) {
> + NEXT_ARG();
> + set_ctrlmode("restricted", *argv, &cm, CAN_CTRLMODE_RESTRICTED);
> } else if (matches(*argv, "restart") == 0) {
> __u32 val = 1;
Good example of iproute2 has banned use of matches. Because usage like the
(think of what happens when user was previously using 'r')