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,12 +9619,15 @@ virDomainControllerDefParseXML(virDomainXMLOption *xmlopt,
return NULL; return NULL;
} }
if (ioeventfd && if (ioeventfd) {
(def->ioeventfd = virTristateSwitchTypeFromString(ioeventfd)) < 0) { int value;
if ((value = virTristateSwitchTypeFromString(ioeventfd)) < 0) {
virReportError(VIR_ERR_XML_ERROR, virReportError(VIR_ERR_XML_ERROR,
_("Malformed 'ioeventfd' value %s"), ioeventfd); _("Malformed 'ioeventfd' value %s"), ioeventfd);
return NULL; return NULL;
} }
def->ioeventfd = value;
}
if (iothread) { if (iothread) {
if (virStrToLong_uip(iothread, NULL, 10, &def->iothread) < 0) { if (virStrToLong_uip(iothread, NULL, 10, &def->iothread) < 0) {

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;