[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <571c60ef-1c9e-62c1-1cd4-6bd90341b15f@gmail.com>
Date: Wed, 21 Oct 2020 12:42:40 -0600
From: David Ahern <dsahern@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>,
Guillaume Nault <gnault@...hat.com>
Cc: netdev@...r.kernel.org, martin.varghese@...ia.com
Subject: Re: [PATCH v2 iproute2-next 1/2] m_vlan: add pop_eth and push_eth
actions
On 10/21/20 12:32 PM, Stephen Hemminger wrote:
> On Mon, 19 Oct 2020 17:23:01 +0200
> Guillaume Nault <gnault@...hat.com> wrote:
>
>> + } else if (matches(*argv, "pop_eth") == 0) {
>
> Using matches allows for shorter command lines but can be make
> for bad user experience if strings overlap.
>
> For example 'p' here will match the pop_eth and not the push_eth.
>
> Is it time to use full string compare for these options?
>
I thought the same, but let it go given the pervasive use of 'matches'.
I do think iproute2 needs to stop adding more uses of it and forcing
full strcmp's.
Powered by blists - more mailing lists