mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
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 <mprivozn@redhat.com>
This commit is contained in:
parent
4346c9eb97
commit
cce282fe87
@ -3371,7 +3371,8 @@ qemuBuildMemoryBackendStr(unsigned long long size,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If none of the following is requested... */
|
/* 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) {
|
def->mem.source != VIR_DOMAIN_MEMORY_SOURCE_FILE && !force) {
|
||||||
/* report back that using the new backend is not necessary
|
/* report back that using the new backend is not necessary
|
||||||
* to achieve the desired configuration */
|
* to achieve the desired configuration */
|
||||||
|
Loading…
Reference in New Issue
Block a user