mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
qemu: use correct backendType when checking memfd capability
The backend name is memory-backend-memfd but we've been checking for memory-backend-memory. Reported by GCC on rawhide: ../../../src/internal.h:75:22: error: 'strcmp' of a string of length 21 and an array of size 21 evaluates to nonzero [-Werror=string-compare] ../../../src/qemu/qemu_command.c:3525:20: note: in expansion of macro 'STREQ' 3525 | } else if (STREQ(backendType, "memory-backend-memory") && | ^~~~~ Signed-off-by: Ján Tomko <jtomko@redhat.com> Fixes: 24b74d187cab48a9dc9f409ea78900154c709579 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
4ba063afb8
commit
8400b6c198
@ -3522,7 +3522,7 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps,
|
||||
_("this qemu doesn't support the "
|
||||
"memory-backend-ram object"));
|
||||
return -1;
|
||||
} else if (STREQ(backendType, "memory-backend-memory") &&
|
||||
} else if (STREQ(backendType, "memory-backend-memfd") &&
|
||||
!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_MEMFD)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("this qemu doesn't support the "
|
||||
|
Loading…
x
Reference in New Issue
Block a user