chiark / gitweb /
Prep v226: Apply missing fixes and changes to src/basic
[elogind.git] / src / basic / virt.c
index 764de955a5b75cb9bd55415fef65770383a891e3..1f9843babc3e62e4c671b7c0ed33058a5c6f2170 100644 (file)
@@ -156,7 +156,8 @@ static int detect_vm_dmi(const char **_id) {
                 "VMW\0"                   "vmware\0"
                 "innotek GmbH\0"          "oracle\0"
                 "Xen\0"                   "xen\0"
-                "Bochs\0"                 "bochs\0";
+                "Bochs\0"                 "bochs\0"
+                "Parallels\0"             "parallels\0";
         unsigned i;
 
         for (i = 0; i < ELEMENTSOF(dmi_vendors); i++) {
@@ -244,8 +245,9 @@ int detect_vm(const char **id) {
         r = detect_vm_dmi(&_id);
 
         /* kvm with and without Virtualbox */
+        /* Parallels exports KVMKVMKVM leaf */
         if (streq_ptr(_id_cpuid, "kvm")) {
-                if (r > 0 && streq(_id, "oracle"))
+                if (r > 0 && (streq(_id, "oracle") || streq(_id, "parallels")))
                         goto finish;
 
                 _id = _id_cpuid;