chiark / gitweb /
virt: Update cache if the detected vm is virtualbox (#5364)
authorBenjamin Robin <benjarobin@users.noreply.github.com>
Fri, 17 Feb 2017 07:45:30 +0000 (08:45 +0100)
committerSven Eden <yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:36 +0000 (17:58 +0200)
src/basic/virt.c

index 66ce7ec..276df83 100644 (file)
@@ -328,8 +328,10 @@ int detect_vm(void) {
          * -> Third try to detect from dmi. */
 
         dmi = detect_vm_dmi();
-        if (dmi == VIRTUALIZATION_ORACLE)
-                return dmi;
+        if (dmi == VIRTUALIZATION_ORACLE) {
+                r = dmi;
+                goto finish;
+        }
 
         r = detect_vm_cpuid();
         if (r < 0)