12250 zonestat_usage(): stderr vs. stdio dilemma

Review Request #2499 - Created Jan. 26, 2020 and submitted

Information
Marcel Telka
illumos-gate
master
12250
6b98d32...
Reviewers
general
This fixes zonestat_usage() in the zonestat(1) command to print its usage
consistently to either stderr or stdout.
Without the fix:

$ /usr/bin/zonestat 2>/dev/null | wc -l
27
$ /usr/bin/zonestat 2>&1 >/dev/null | wc -l
31
$

With the fix:

$ proto/root_i386/usr/bin/zonestat 2>/dev/null | wc -l
0
$ proto/root_i386/usr/bin/zonestat 2>&1 >/dev/null | wc -l
58
$
Toomas Soome
Peter Tribble
Gergő Mihály Doma
Marcel Telka
Review request changed

Status: Closed (submitted)

Change Summary:

commit 881f4659ab3a3d7bac3274ca7320c076fcd007de
Author:     Marcel Telka <marcel@telka.sk>
AuthorDate: Sat Jan 25 11:35:29 2020 +0100
Commit:     Dan McDonald <danmcd@joyent.com>
CommitDate: Mon Jan 27 09:54:00 2020 -0500

    12250 zonestat_usage(): stderr vs. stdio dilemma
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Peter Tribble <peter.tribble@gmail.com>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

:100644 100644 fac6f97371 358c31c4fa M	usr/src/cmd/zonestat/zonestat/zonestat.c
Loading...