dmidecode should print diagnostic messages to stderr
Bug #1688162 reported by
Jens Elkner
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dmidecode (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Ubuntu version of dmidecode breaks several scripts because it prints diagnostics messages to stdout instead of stderr.
E.g.: sudo /bin/ksh93
# /usr/sbin/dmidecode -s baseboard-
Supermicro
Invalid entry length (16). Fixed up to 11.
The original version (https:/
# /tmp/dmidecode -s baseboard-
Supermicro
$ /usr/bin/
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
affects: | qemu (Ubuntu) → dmidecode (Ubuntu) |
To post a comment you must log in.
Hi Jens,
this seems to be specific to that invalid length error.
As I have seen that e.g. access denied or wrong option errors work just the way they should.
# insufficient permission manufacturer 2>/dev/null
$ /usr/sbin/dmidecode -s baseboard-
# bad option
$ sudo /usr/sbin/dmidecode -s wrong 2>/dev/null
I found a change upstream that could explain why this fixes it for you: /github. com/mirror/ dmidecode/ commit/ 74614633b31a2ac 01240c72890722a 86a3f3fc97
https:/
Applying only has slight errors that are easily fixed (5x offset and one fail that is easy to resolve).
I'll leave it as this for now as I'm in no way a dmidecode expert - I've only seen it because it was accidentally qemu and found it interesting. But I'll subscribe myself, if nothing is happening in ~2 weeks please ping and I'll take another look.