From 2f8e375d170f51c8224652ebb976c12a6a018da9 Mon Sep 17 00:00:00 2001 From: Benjamin Robin Date: Fri, 17 Feb 2017 08:45:30 +0100 Subject: virt: Update cache if the detected vm is virtualbox (#5364) --- src/basic/virt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/basic/virt.c b/src/basic/virt.c index 830dc655e3..9d615da681 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -329,8 +329,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) -- cgit v1.2.3-54-g00ecf