conf: disk: Mark VIR_DOMAIN_DISK_IO_DEFAULT as 0 and simplify parsing

This commit is contained in:
Peter Krempa 2016-04-20 15:50:04 +02:00
parent 8a3dea1f11
commit ffaacefada
2 changed files with 2 additions and 3 deletions

View File

@ -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;

View File

@ -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,