mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 03:25:31 +03:00
virt: detect dmi before cpuid
Virtualbox should be detected as 'oracle'. This used to work but broke
with commit:
commit 75f86906c5
Author: Lennart Poettering <lennart@poettering.net>
Date: Mon Sep 7 13:42:47 2015 +0200
basic: rework virtualization detection API
We swap detection for dmi and cpuid, this fixes Virtualbox with KVM.
Hopefully it does not break anything else.
This commit is contained in:
parent
8a85b710aa
commit
050e65ada2
@ -269,13 +269,13 @@ int detect_vm(void) {
|
|||||||
if (cached_found >= 0)
|
if (cached_found >= 0)
|
||||||
return cached_found;
|
return cached_found;
|
||||||
|
|
||||||
r = detect_vm_cpuid();
|
r = detect_vm_dmi();
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
if (r != VIRTUALIZATION_NONE)
|
if (r != VIRTUALIZATION_NONE)
|
||||||
goto finish;
|
goto finish;
|
||||||
|
|
||||||
r = detect_vm_dmi();
|
r = detect_vm_cpuid();
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
if (r != VIRTUALIZATION_NONE)
|
if (r != VIRTUALIZATION_NONE)
|
||||||
|
Loading…
Reference in New Issue
Block a user