Bug 1481421

Summary: mcelog --help returns 1
Product: Red Hat Enterprise Linux 7 Reporter: Andrej Manduch <amanduch>
Component: mcelogAssignee: Prarit Bhargava <prarit>
Status: CLOSED ERRATA QA Contact: Andrej Manduch <amanduch>
Severity: low Docs Contact:
Priority: low    
Version: 7.4CC: jshortt
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 18:32:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1442258    

Description Andrej Manduch 2017-08-14 20:46:31 UTC
Description of problem:

In mcelog man page is briefly mentioned --help argument:
"
       When the --cpu=cputype option is specified set the to be decoded CPU to cputype.  See mcelog  --help  for  a
       list  of  valid CPUs.  Note that specifying an incorrect CPU can lead to incorrect decoding output.  Default
       is either the CPU of the machine that reported the machine check (needs a newer kernel version) or  the  CPU

"

when you run mcelog --help it would at first write: "mcelog: unrecognized option '--help'" and after that it prints out help message with list of command to stderr and mcelog would return error code 1.


Because --help argument is mentioned in manpage I think it should not print "unrecognized option" or it should not be mentioned in manpage.


My recomendation.

add --help to argument list, print help message to stdout, and return 0
OR
remove --help from manpage

Comment 1 Andrej Manduch 2017-08-15 10:37:27 UTC
On same matter actually also 'mcelog --version' outputs everything to stderr.
To me it seems to be wrong.

Comment 2 Prarit Bhargava 2017-10-13 13:33:39 UTC
Sent patch to Andi upstream, patch was accepted.

916015663906 ("mcelog: Add --help option.")

P.

Comment 8 errata-xmlrpc 2018-04-10 18:32:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0991