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] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ