Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/conf/domain_conf.c | 14 +++++++++----- src/conf/domain_conf.h | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0b12ec61f9..72664bd72b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9001,11 +9001,15 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def, } VIR_FREE(tmp); - if ((tmp = virXMLPropString(cur, "io")) && - (def->iomode = virDomainDiskIoTypeFromString(tmp)) <= 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown disk io mode '%s'"), tmp); - return -1; + if ((tmp = virXMLPropString(cur, "io"))) { + int iomode; + + if ((iomode = virDomainDiskIoTypeFromString(tmp)) <= 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unknown disk io mode '%s'"), tmp); + return -1; + } + def->iomode = iomode; } VIR_FREE(tmp); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index d808f5b260..3402b3f85a 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -569,7 +569,7 @@ struct _virDomainDiskDef { virDomainDiskCache cachemode; virDomainDiskErrorPolicy error_policy; virDomainDiskErrorPolicy rerror_policy; - int iomode; /* enum virDomainDiskIo */ + virDomainDiskIo iomode; virTristateSwitch ioeventfd; virTristateSwitch event_idx; virTristateSwitch copy_on_read; -- 2.26.3