---
 src/conf/domain_conf.c | 3 +--
 src/conf/domain_conf.h | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 5ac4beb..9c4edfa 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6967,8 +6967,7 @@ virDomainDiskDefDriverParseXML(virDomainDiskDefPtr def,
     }

     if (iotag) {
-        if ((def->iomode = virDomainDiskIoTypeFromString(iotag)) < 0 ||
-            def->iomode == VIR_DOMAIN_DISK_IO_DEFAULT) {
+        if ((def->iomode = virDomainDiskIoTypeFromString(iotag)) <= 0) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("unknown disk io mode '%s'"), iotag);
             goto cleanup;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 1986f53..555d45d 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -622,7 +622,7 @@ typedef enum {
 } virDomainDiskGeometryTrans;

 typedef enum {
-    VIR_DOMAIN_DISK_IO_DEFAULT,
+    VIR_DOMAIN_DISK_IO_DEFAULT = 0,
     VIR_DOMAIN_DISK_IO_NATIVE,
     VIR_DOMAIN_DISK_IO_THREADS,

-- 
2.8.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to