]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lscpu: cleanup DMI detection return codes
authorKarel Zak <kzak@redhat.com>
Tue, 13 Jun 2017 10:15:11 +0000 (12:15 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 13 Jun 2017 10:15:11 +0000 (12:15 +0200)
commitc972852b29391c35b1d5c7d3e1e6413e0cc86908
tree52a51be0c7c7cc2d922f4a63e8883179f00ce82a
parentf12e4374368056a5af0b2f9d91ee36de40644239
lscpu: cleanup DMI detection return codes

Michal wrote:
 There is weird mix of logic in lscpu-dmi.c which sometimes returns 0 and
 sometimes -1 on error. Since most checks are if (rc) goto done; this
 bails out early on error skipping some detection methods. Further, in
 lscpu.c all following detections are guarder by if(hyper) so returning
 -1 causes all following methods to be skipped.

Reported-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lscpu-dmi.c