提交 8fcee478 编写于 作者: M Michal Privoznik

qemu_firmware: Accept int in qemuFirmwareOSInterfaceTypeFromOsDefFirmware()

The point of this function is to translate virDomainOsDefFirmware
enum to qemuFirmwareOSInterface enum. However, with my commit
v5.10.0-507-g8e1804f9 we are passing a variable type of
virDomainLoader enum. Make the function accept both enums and
make the enum members correspond to each other.

This fixes clang build.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 54ba7da5
......@@ -1928,12 +1928,14 @@ struct _virDomainOSEnv {
typedef enum {
VIR_DOMAIN_OS_DEF_FIRMWARE_NONE = 0,
VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS,
VIR_DOMAIN_OS_DEF_FIRMWARE_EFI,
VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS = VIR_DOMAIN_LOADER_TYPE_ROM,
VIR_DOMAIN_OS_DEF_FIRMWARE_EFI = VIR_DOMAIN_LOADER_TYPE_PFLASH,
VIR_DOMAIN_OS_DEF_FIRMWARE_LAST
} virDomainOsDefFirmware;
G_STATIC_ASSERT((int)VIR_DOMAIN_OS_DEF_FIRMWARE_LAST == (int)VIR_DOMAIN_LOADER_TYPE_LAST);
VIR_ENUM_DECL(virDomainOsDefFirmware);
struct _virDomainOSDef {
......
......@@ -929,7 +929,7 @@ qemuFirmwareMatchesMachineArch(const qemuFirmware *fw,
static qemuFirmwareOSInterface
qemuFirmwareOSInterfaceTypeFromOsDefFirmware(virDomainOsDefFirmware fw)
qemuFirmwareOSInterfaceTypeFromOsDefFirmware(int fw)
{
switch (fw) {
case VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册