代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 5d17ae66252024451c1e9f30f348f5e223b26c72 Mon Sep 17 00:00:00 2001
From: chenyuhui <chenyuhui5@huawei.com>
Date: Tue, 2 Aug 2022 10:51:59 +0800
Subject: [PATCH 19/22] virDomainInputDefValidate: Validate model
If input device has one of virtio* models set then it has to go
onto virtio bus. Introduce such check into the validator.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2081981
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
---
src/conf/domain_conf.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2d1726af8f..b8cf1adb98 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6834,6 +6834,27 @@ virDomainInputDefValidate(const virDomainInputDef *input)
return -1;
}
+ switch ((virDomainInputModel)input->model) {
+ case VIR_DOMAIN_INPUT_MODEL_VIRTIO:
+ case VIR_DOMAIN_INPUT_MODEL_VIRTIO_TRANSITIONAL:
+ case VIR_DOMAIN_INPUT_MODEL_VIRTIO_NON_TRANSITIONAL:
+ if (input->bus != VIR_DOMAIN_INPUT_BUS_VIRTIO) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("only bus 'virtio' is supported for input model '%s'"),
+ virDomainInputModelTypeToString(input->model));
+ return -1;
+ }
+ break;
+
+ case VIR_DOMAIN_INPUT_MODEL_DEFAULT:
+ break;
+
+ case VIR_DOMAIN_INPUT_MODEL_LAST:
+ default:
+ virReportEnumRangeError(virDomainInputModel, input->model);
+ return -1;
+ }
+
return 0;
}
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。