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.
|