lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 01 Dec 2020 23:56:11 +0100
From:   Petr Machata <me@...chata.org>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     Petr Machata <me@...chata.org>, netdev@...r.kernel.org,
        dsahern@...il.com, Po.Liu@....com, toke@...e.dk,
        dave.taht@...il.com, edumazet@...gle.com, tahiliani@...k.edu.in,
        vtlam@...gle.com, leon@...nel.org
Subject: Re: [PATCH iproute2-next 2/6] lib: Move print_rate() from tc here; modernize


Stephen Hemminger <stephen@...workplumber.org> writes:

>> +int print_color_rate(bool use_iec, enum output_type t, enum color_attr color,
>> +		     const char *key, const char *fmt, unsigned long long rate);
>> +
>> +static inline int print_rate(bool use_iec, enum output_type t,
>> +			     const char *key, const char *fmt,
>> +			     unsigned long long rate)
>> +{
>> +	return print_color_rate(use_iec, t, COLOR_NONE, key, fmt, rate);
>> +}
>> +
>
> Overall this looks good, but is there any case where color output
> makes sense for this field? If not then why do all the color wrappers.

All the print_X functions in json_print comes with a print_color_X
flavor as well, even the ones where all clients just use the plain
output. (Notably the recently added on_off. Colors were even one of the
arguments in favor of putting that one to json_print, despite nobody
actually using them for on/off.)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ