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
| ||
|
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D5F50D107@AcuExch.aculab.com> Date: Tue, 9 Aug 2016 10:34:05 +0000 From: David Laight <David.Laight@...LAB.COM> To: 'Stephen Hemminger' <stephen@...workplumber.org>, Jiri Pirko <jiri@...nulli.us> CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "davem@...emloft.net" <davem@...emloft.net>, "idosch@...lanox.com" <idosch@...lanox.com>, "eladr@...lanox.com" <eladr@...lanox.com>, "yotamg@...lanox.com" <yotamg@...lanox.com>, "nogahf@...lanox.com" <nogahf@...lanox.com>, "ogerlitz@...lanox.com" <ogerlitz@...lanox.com> Subject: RE: [patch iproute2 1/2] devlink: write usage help messages to stderr From: Stephen Hemminger > Sent: 08 August 2016 16:57 > To: Jiri Pirko ... > > >> In order to not confuse reader, write help messages into stderr. > > >> > > >> Signed-off-by: Jiri Pirko <jiri@...lanox.com> > > > > > >This does make devlink consistent with other parts of iproute2. > > >But the most common coding standards, back to Unix, and GNU are > > >that help messages should go to stdout so that: > > > $ ip -h | more > > >would work as expected. > > > > The thing is I wanted to make stdout only for json. Putting non-json > > help out there does not look correct to me. Is it? > > > > I applied both of these patches, just wanted to mention that iproute2 is not > following the GNU convention. At this point, it really doesn't matter, there > are arguments to be made for both behaviors. If you output help in response to an invalid option (eg) 'ip -?' then you need to write it to stderr since it is part of the error message. OTOH if help is explicitly requested 'ip -h' then stdout would be ok. Nothing wrong with typing 'ip -h 2>&1 | pg' though. David
Powered by blists - more mailing lists