From: Michal Privoznik Date: Wed, 8 Mar 2017 14:58:26 +0000 (+0100) Subject: qemuBuildMemoryBackendStr: Check for @memAccess properly X-Git-Tag: v3.2.0-rc1~277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cce282fe872882c74c25e124e55762e4b5b79134;p=thirdparty%2Flibvirt.git qemuBuildMemoryBackendStr: Check for @memAccess properly Even though this variable contains just values from an enum where zero has the usual meaning, it's enum after all and we should check it as such. Signed-off-by: Michal Privoznik --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b30bb670f8..531dc41250 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3371,7 +3371,8 @@ qemuBuildMemoryBackendStr(unsigned long long size, } /* If none of the following is requested... */ - if (!needHugepage && !userNodeset && !memAccess && !nodeSpecified && + if (!needHugepage && !userNodeset && !nodeSpecified && + memAccess == VIR_DOMAIN_MEMORY_ACCESS_DEFAULT && def->mem.source != VIR_DOMAIN_MEMORY_SOURCE_FILE && !force) { /* report back that using the new backend is not necessary * to achieve the desired configuration */