mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-24 23:40:39 +01:00
[v1.03][X86] Do not consider an empty HV as a bug
This commit is contained in:
@@ -261,6 +261,11 @@ struct hypervisor* get_hp_info(bool hv_present) {
|
|||||||
|
|
||||||
cpuid(&eax, &ebx, &ecx, &edx);
|
cpuid(&eax, &ebx, &ecx, &edx);
|
||||||
|
|
||||||
|
if(ebx == 0x0 && ecx == 0x0 && edx == 0x0) {
|
||||||
|
hv->hv_vendor = HV_VENDOR_INVALID;
|
||||||
|
printWarn("Hypervisor vendor is empty");
|
||||||
|
}
|
||||||
|
else {
|
||||||
char name[13];
|
char name[13];
|
||||||
memset(name, 0, 13);
|
memset(name, 0, 13);
|
||||||
get_name_cpuid(name, ebx, ecx, edx);
|
get_name_cpuid(name, ebx, ecx, edx);
|
||||||
@@ -279,6 +284,7 @@ struct hypervisor* get_hp_info(bool hv_present) {
|
|||||||
hv->hv_vendor = HV_VENDOR_INVALID;
|
hv->hv_vendor = HV_VENDOR_INVALID;
|
||||||
printBug("Unknown hypervisor vendor: %s", name);
|
printBug("Unknown hypervisor vendor: %s", name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
hv->hv_name = hv_vendors_name[hv->hv_vendor];
|
hv->hv_name = hv_vendors_name[hv->hv_vendor];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user