patchdmidecode - Patches: patch #8989, Output "Invalid entry...


You are not allowed to post comments on this tracker with your current authentication level.

patch #8989: Output "Invalid entry length.. Fixed up" warning to stderr

Submitter:  Kevin Bowling <kev009>
Submitted:  Fri 29 Apr 2016 01:49:03 AM UTC
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  khali Open/Closed:  Closed

Jump to the original submission

Fri 22 Jul 2016 08:47:47 AM UTC, comment #6: 
Jean Delvare <khali>
Group administrator
Tue 03 May 2016 07:03:35 AM UTC, comment #5: 

> Shouldn't be outputting side channel info in -s with or without -q then.

This is exactly what my patch does. Didn't you try it?

Jean Delvare <khali>
Group administrator
Mon 02 May 2016 07:19:45 PM UTC, comment #4: 

Shouldn't be outputting side channel info in -s with or without -q then.

I think they could be # in the no args output.

Kevin Bowling <kev009>
Mon 02 May 2016 04:09:25 PM UTC, comment #3: 

Please let's not mix everything up.

The fact that the warning is being displayed when not relevant is a bug, that should be fixed (my patch does that.)

What belongs to stdout and what belongs to stderr is a related but different discussion. dmidecode is printing lots of side information (usually prefixed with "# ") to stdout, on purpose. These are considered to be of general interest to the reader and not errors.

stderr is used to print fatal errors, when dmidecode is not actually able to read or decode the table for whatever reason.

Fix-up messages are somewhat in the middle, admittedly. But given that they relate to the contents of the table, I tend to consider them part of the standard output, not errors. Maybe they should be prefixed with "# ", I'm not sure.

Jean Delvare <khali>
Group administrator
Fri 29 Apr 2016 03:49:05 PM UTC, comment #2: 

It should default to off, this breaks tooling like SaltStack, Factor, and other configuration management and inventory tools.  No need to punish admins who are already punished by the likely crappy hardware or change the rest of the software world because of a warning that most people can't do anything about.

stderr is built for this, if you need that data for a bug report then you might have to ask the user to redirect stderr to stdout, and that is a lot better than surprising users of existing tools when they upgrade their OS and getting more bug reports.

Kevin Bowling <kev009>
Fri 29 Apr 2016 12:26:51 PM UTC, comment #1: 

I don't much like moving messages from stdout to stderr, because in the context of support, you often ask people to send you the output of dmidecode. Everything going to stderr will typically be missing from the file you receive.

Also I don't think this is sufficient here anyway. There is simply no reason to display this message if we aren't displaying the entry which is being fixed. That's confusing. I'll attach an alternative patch which removes the message in cases it isn't relevant. Please let me know if that works for you.

Jean Delvare <khali>
Group administrator
Fri 29 Apr 2016 01:49:03 AM UTC, original submission:  

This fixup warning interferes with tools that read stdout.  Push the warning to stderr where it belongs.

Kevin Bowling <kev009>


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

Attached Files
file #37016:  invalidentryfixup.patch added by kev009 (627B - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by khali (Posted a comment)
  • -email is unavailable- added by kev009 (Submitted the item)
  • -email is unavailable- added by kev009

    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.


    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-22 khali StatusNeed Info Done
        Open/ClosedOpen Closed
    2016-04-29 khali StatusIn Progress Need Info
    2016-04-29 khali Attached File- Added hide-unrelated-error-message.patch, #37019
        StatusNone In Progress
    2016-04-29 khali Assigned toNone khali
    2016-04-29 kev009 Attached File- Added invalidentryfixup.patch, #37016
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.12