Bug 143916

Summary: hdparm --help should write to stdout not stderr
Product: [Fedora] Fedora Reporter: Ed Avis <ed>
Component: hdparmAssignee: Karsten Hopp <karsten>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-03 10:36:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ed Avis 2005-01-01 10:29:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5)
Gecko/20041110 Firefox/1.0

Description of problem:
hdparm --help writes help text to stderr and then exits with a failure
status.  But the GNU standard is for the help text to go to stdout,
and for the command to then exit with status zero.  For example:

% grep --help >/dev/null && echo yes
% hdparm --help >/dev/null && echo yes


Version-Release number of selected component (if applicable):
hdparm-5.7-2

How reproducible:
Always

Steps to Reproduce:
hdparm --help

Actual Results:  Usage text printed on stdout file descriptor and
hdparm exits with nonzero status.

Expected Results:  Usage text goes to stdout and exit status is zero.

Additional info:

Comment 2 Karsten Hopp 2005-01-03 10:36:44 UTC
hdparm prints the help text to stderr and exits with  failure status
if you omit a required parameter or use unsupported options such as
--help. It prints to stdout and exits with status zero if you run it
with the option -h to get help.
I've added support for --help and have built a new package.