提交 8400b6c1 编写于 作者: J Ján Tomko

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: NJán Tomko <jtomko@redhat.com>
Fixes: 24b74d18Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 4ba063af
......@@ -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 "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册