]> 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>
Fri, 23 Jun 2017 13:14:34 +0000 (15:14 +0200)
commit38be54d2829ca010d93fae0110e6a3f41f5d5298
tree01406c0f1f20bb9732ec493514ec2984a9ebabec
parentb49c756b0e781ae9bb59b532fab092780365294a
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