bugdmidecode - Bugs: bug #48158, Error messages go to stdout

 
 

bug #48158: Error messages go to stdout

Submitter:  Simon Rettberg <simonr>
Submitted:  Tue 07 Jun 2016 09:02:00 AM UTC
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  khali
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Fri 22 Jul 2016 08:48:43 AM UTC, comment #3: 
Jean Delvare <khali>
Project Administrator
Thu 14 Jul 2016 11:31:55 AM UTC, comment #2: 

Looks good to me so far, no more errors on the iMac. :)

Simon Rettberg <simonr>
Mon 04 Jul 2016 10:03:01 AM UTC, comment #1: 

With so many people asking for error messages to go to stderr, I have to admit I was wrong and just do it. Can you try the attached patch? Thanks.

(file #37700)

Jean Delvare <khali>
Project Administrator
Tue 07 Jun 2016 09:02:00 AM UTC, original submission:  

I'm running dmidecode on an iMac, and get the following error message at the end of the output:

Invalid entry length (0). DMI table is broken! Stop.

Since this message is printed to stdout, it's a little cumbersome to get e.g. the system-uuid in scripts, since it looks like this:

# dmidecode -q -s system-uuid 2>/dev/null
3EE36F19-40F6-BA5C-8D30-23ED91AF7068
Invalid entry length (0). DMI table is broken! Stop.

You'd need some extra work using e.g. grep to make sure to get the UUID only, without trailing garbage.

I think this error should be printed to stderr, at least when using the -s command line switch. I also noticed the exit code is 0, but maybe this should be kept this way as long as the table could be parsed up until the point where the requested info lies.

This is very similar to #47274, and maybe there are more instances where errors go to stdout; could only spot one more instance at a quick glance however.

Simon Rettberg <simonr>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #37700:  dmidecode-errors-to-stderr.patch added by khali (3KiB - text/x-patch - [PATCH] dmidecode: Move error messages to stderr)
file #37418:  stderr.patch added by simonr (799B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by khali (Updated the item)
  • -email is unavailable- added by simonr (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-22 khali Open/ClosedOpen Closed
    2016-07-22 khali StatusConfirmed Fixed
    2016-07-04 khali Attached File- Added dmidecode-errors-to-stderr.patch, #37700
        StatusNone Confirmed
        Assigned toNone khali
    2016-06-07 simonr Attached File- Added stderr.patch, #37418

    Back to the top


    Powered by Savane 3.9