summaryrefslogtreecommitdiff
path: root/src/basic/virt.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-03-23 15:21:35 +0100
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commitd469ad4c68fe9118cabf0700daaa9922f9952149 (patch)
treeeab61fc4c5e1656daff7b53530031b7de5e60be3 /src/basic/virt.c
parent19c181d02326ea6ec5530983ce7d17f2e455492d (diff)
tree-wide: tabs suck (#8527)
Diffstat (limited to 'src/basic/virt.c')
-rw-r--r--src/basic/virt.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 9290dff3b..4850384c0 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -333,16 +333,13 @@ int detect_vm(void) {
/* We have to use the correct order here:
*
- * → First, try to detect Oracle Virtualbox, even if it uses KVM, as well as Xen even if it cloaks as Microsoft
- * Hyper-V.
- *
- * → Second, try to detect from CPUID, this will report KVM for whatever software is used even if info in DMI is
- * overwritten.
- *
- * → Third, try to detect from DMI. */
+ * -> First try to detect Oracle Virtualbox, even if it uses KVM.
+ * -> Second try to detect from cpuid, this will report KVM for
+ * whatever software is used even if info in dmi is overwritten.
+ * -> Third try to detect from dmi. */
dmi = detect_vm_dmi();
- if (IN_SET(dmi, VIRTUALIZATION_ORACLE, VIRTUALIZATION_XEN)) {
+ if (dmi == VIRTUALIZATION_ORACLE) {
r = dmi;
goto finish;
}
@@ -371,7 +368,7 @@ int detect_vm(void) {
* because we're not an x86 guest), then we should try the /proc/xen
* directory next. If that's not found, then we check for the high-level
* hypervisor sysfs file.
- */
+ */
r = detect_vm_xen();
if (r < 0)