From: Benjamin Robin Date: Fri, 17 Feb 2017 07:45:30 +0000 (+0100) Subject: virt: Update cache if the detected vm is virtualbox (#5364) X-Git-Tag: v233~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2f8e375d170f51c8224652ebb976c12a6a018da9;p=thirdparty%2Fsystemd.git virt: Update cache if the detected vm is virtualbox (#5364) --- diff --git a/src/basic/virt.c b/src/basic/virt.c index 830dc655e38..9d615da681e 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)