]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuBuildMemoryBackendStr: Check for @memAccess properly
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 8 Mar 2017 14:58:26 +0000 (15:58 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 15 Mar 2017 09:49:19 +0000 (10:49 +0100)
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 <mprivozn@redhat.com>
src/qemu/qemu_command.c

index b30bb670f8e4f70028c92d9326890d1da1b42720..531dc41250edc7765c5feff753b633e6fd72d1b8 100644 (file)
@@ -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 */