1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

cpu-data.py: Automatically adjust command line for kcpuid

kcpuid does not have a "-1" flag.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-04-27 10:25:03 +02:00 committed by Michal Privoznik
parent 95a89ed012
commit d1873e03b4

View File

@ -116,7 +116,7 @@ def gather_cpuid_leaves(args):
cpuid = args.path_to_cpuid or "cpuid"
try:
output = subprocess.check_output(
[cpuid, "-1r"],
[cpuid, "-r" if "kcpuid" in cpuid else "-1r"],
universal_newlines=True)
except FileNotFoundError as e:
exit("Error: '{}' not found.\n'cpuid' can be usually found in a "