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;
}
if (ioeventfd &&
(def->ioeventfd = virTristateSwitchTypeFromString(ioeventfd)) < 0) {
virReportError(VIR_ERR_XML_ERROR,
_("Malformed 'ioeventfd' value %s"), ioeventfd);
return NULL;
if (ioeventfd) {
int value;
if ((value = virTristateSwitchTypeFromString(ioeventfd)) < 0) {
virReportError(VIR_ERR_XML_ERROR,
_("Malformed 'ioeventfd' value %s"), ioeventfd);
return NULL;
}
def->ioeventfd = value;
}
if (iothread) {

View File

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