Commit Graph

13 Commits

Author SHA1 Message Date
Karel Zak 35d458708e lscpu: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-06-21 15:22:04 +02:00
Sami Kerola 01258182bb
lscpu: fix variable shadowing
sys-utils/lscpu-virt.c: In function ‘lscpu_read_virtualization’:
    sys-utils/lscpu-virt.c:574:9: warning: declaration of ‘buf’ shadows a previous local [-Wshadow]
      574 |    char buf[256];
          |         ^~~
    sys-utils/lscpu-virt.c:506:7: note: shadowed declaration is here
      506 |  char buf[BUFSIZ];
          |       ^~~

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2020-12-28 09:53:12 +00:00
Masayoshi Mizuma 3cd676f5ec lscpu-dmi: Move some functions related to DMI to lscpu-dmi
Move some functions related to DMI to lscpu-dmi.

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
2020-11-20 09:17:12 +01:00
Masayoshi Mizuma b04ab8dd8a lscpu-virt: split hypervisor_from_dmi_table()
Split hypervisor_from_dmi_table() to parsing dmi table and checking the
hypervisor vendor.

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
2020-11-20 09:17:12 +01:00
Érico Rolim b3ea5aaa64 lscpu-virt: fix return type of read_hypervisor_cpuid for non x86. 2020-11-15 11:53:39 -03:00
Karel Zak 91eef60ca3 lscpu: split output to sections
Let's make it more readable for humans.

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 095be2c20e lscpu: merge new API to lscpu.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 3d590f8ea1 lscpu: (virt) add macros for VMWARE
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 9aa82cd7e6 lscpu: (virt) simplify hypervisor parsing
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 021d0b3d1d lscpu: keep hypervisor name in allocated memory
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 504de58512 lscpu: convert ARM decoding to new API
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak a94bb4357e lscpu: cleaup arch freeing
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00
Karel Zak 909d35758e lscpu: add lscpu_read_virtualization()
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-13 09:19:02 +01:00