virDomainControllerDef: Change type of ioeventfd to virTristateSwitch

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-04-23 12:37:33 +02:00 committed by Ján Tomko
parent c02c301130
commit 8395c909a6
2 changed files with 9 additions and 6 deletions

View File

@ -9619,11 +9619,14 @@ virDomainControllerDefParseXML(virDomainXMLOption *xmlopt,
return NULL; return NULL;
} }
if (ioeventfd && if (ioeventfd) {
(def->ioeventfd = virTristateSwitchTypeFromString(ioeventfd)) < 0) { int value;
virReportError(VIR_ERR_XML_ERROR, if ((value = virTristateSwitchTypeFromString(ioeventfd)) < 0) {
_("Malformed 'ioeventfd' value %s"), ioeventfd); virReportError(VIR_ERR_XML_ERROR,
return NULL; _("Malformed 'ioeventfd' value %s"), ioeventfd);
return NULL;
}
def->ioeventfd = value;
} }
if (iothread) { if (iothread) {

View File

@ -763,7 +763,7 @@ struct _virDomainControllerDef {
unsigned int queues; unsigned int queues;
unsigned int cmd_per_lun; unsigned int cmd_per_lun;
unsigned int max_sectors; unsigned int max_sectors;
int ioeventfd; /* enum virTristateSwitch */ virTristateSwitch ioeventfd;
unsigned int iothread; /* unused = 0, > 0 specific thread # */ unsigned int iothread; /* unused = 0, > 0 specific thread # */
union { union {
virDomainVirtioSerialOpts vioserial; virDomainVirtioSerialOpts vioserial;