[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241204083105.1827dd73@hermes.local>
Date: Wed, 4 Dec 2024 08:31:05 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Robert Marko <robert.marko@...tura.hr>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, dsahern@...nel.org, jiri@...nulli.us, andrew@...n.ch,
luka.perkov@...tura.hr
Subject: Re: [iproute2-next] ip: link: rmnet: add support for flag handling
On Tue, 3 Dec 2024 13:47:59 +0100
Robert Marko <robert.marko@...tura.hr> wrote:
> + } else if (matches(*argv, "deaggregate") == 0) {
> + NEXT_ARG();
> + flags.mask |= RMNET_FLAGS_INGRESS_DEAGGREGATION;
> + if (strcmp(*argv, "on") == 0)
> + flags.flags |= RMNET_FLAGS_INGRESS_DEAGGREGATION;
> + else if (strcmp(*argv, "off") == 0)
> + flags.flags &= RMNET_FLAGS_INGRESS_DEAGGREGATION;
> + else
> + return on_off("deaggregate", *argv);
> + } else if (matches(*argv, "commands") == 0) {
> + NEXT_ARG();
> + flags.mask |= RMNET_FLAGS_INGRESS_MAP_COMMANDS;
> + if (strcmp(*argv, "on") == 0)
> + flags.flags |= RMNET_FLAGS_INGRESS_MAP_COMMANDS;
> + else if (strcmp(*argv, "off") == 0)
> + flags.flags &= RMNET_FLAGS_INGRESS_MAP_COMMANDS;
> + else
> + return on_off("commands", *argv);
> + } else if (matches(*argv, "qmapv4") == 0) {
New uses of matches() is discouraged because it leads to argument conflicts.
Use strcmp instead.
Powered by blists - more mailing lists