[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <n53rpn94-172n-p571-188o-pq6915q8r323@vanv.qr>
Date: Mon, 12 Oct 2020 19:27:21 +0200 (CEST)
From: Jan Engelhardt <jengelh@...i.de>
To: Stephen Hemminger <stephen@...workplumber.org>
cc: netdev@...r.kernel.org
Subject: Re: [iproute PATCH v2] lib/color: introduce freely configurable
color strings
On Monday 2020-10-12 19:04, Stephen Hemminger wrote:
>
>> +static struct color_code {
>> + const char match[8], *code;
>> + int len;
>> +} color_codes[C_MAX] = {
>> + {"iface="}, {"lladdr="}, {"v4addr="}, {"v6addr="}, {"operup="},
>> + {"operdn="}, {"clear=", "0", 1},
>> };
>
>Also if each match has = that maybe redundant.
The = is needed so that strncmp in set_color_palette will do an equality
match on the key name rather than a prefix match.
Powered by blists - more mailing lists