提交 ffaacefa 编写于 作者: P Peter Krempa

conf: disk: Mark VIR_DOMAIN_DISK_IO_DEFAULT as 0 and simplify parsing

上级 8a3dea1f
......@@ -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;
......
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册