chiark / gitweb /
tree-wide: tabs suck (#8527)
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Mar 2018 14:21:35 +0000 (15:21 +0100)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
src/basic/virt.c
src/shared/libshared.sym

index 9290dff3be8184499ed07ddfe1f3dc802264a854..4850384c02c5f317bc7beb0459219006aa29a800 100644 (file)
@@ -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)
index e4ae17eede6961c7c696660d3bd5554d10aa446b..6a7495adc33a94ad81442fc82d69a32a3aa4e9b1 100644 (file)
@@ -1,3 +1,3 @@
 SD_SHARED {
-       global: *;
+        global: *;
 };