Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/device_conf.h | 4 ++--
src/qemu/qemu_command.c | 3 ++-
src/qemu/qemu_hotplug.c | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h
index a51bdf10ee..289af1153a 100644
--- a/src/conf/device_conf.h
+++ b/src/conf/device_conf.h
@@ -153,8 +153,8 @@ struct _virDomainDeviceInfo {
} master;
/* rombar and romfile are only used for pci hostdev and network
* devices. */
- int romenabled; /* enum virTristateBool */
- int rombar; /* enum virTristateSwitch */
+ virTristateBool romenabled;
+ virTristateSwitch rombar;
char *romfile;
/* bootIndex is only used for disk, network interface, hostdev
* and redirdev devices */
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 5717f7b98d..73c28ed7a0 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -660,7 +660,8 @@ qemuBuildRomStr(virBufferPtr buf,
case VIR_TRISTATE_SWITCH_ON:
virBufferAddLit(buf, ",rombar=1");
break;
- default:
+ case VIR_TRISTATE_SWITCH_ABSENT:
+ case VIR_TRISTATE_SWITCH_LAST:
break;
}
if (info->romfile) {
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index a66354426d..cc49f10198 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3665,7 +3665,7 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
/* device alias is checked already in virDomainDefCompatibleDevice */
- if (newdev->info.rombar == VIR_TRISTATE_BOOL_ABSENT)
+ if (newdev->info.rombar == VIR_TRISTATE_SWITCH_ABSENT)
newdev->info.rombar = olddev->info.rombar;
if (olddev->info.rombar != newdev->info.rombar) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
--
2.26.2