1 Star 0 Fork 71

baijing_0022/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
conf-validate-serial-port-model-in-ABI-checks.patch 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
Jiangjiacheng 提交于 2023-01-04 12:02 . Backport patches from upstream
From 0e6fcb0eb5e3eb499a3cc7232fa1b7bf9f1813a2 Mon Sep 17 00:00:00 2001
From: jiangdawei15 <jiangdawei15@huawei.com>
Date: Thu, 11 Aug 2022 21:24:35 +0800
Subject: [PATCH 06/22] conf: validate serial port model in ABI checks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The serial port model cannot be allowed to
change across migration as it affects ABI.
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dawei Jiang jiangdawei15@huawei.com
---
src/conf/domain_conf.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1689d92c51..2d1726af8f 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -23058,6 +23058,14 @@ virDomainSerialDefCheckABIStability(virDomainChrDefPtr src,
return false;
}
+ if (src->targetModel != dst->targetModel) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target serial model %s does not match source %s"),
+ virDomainChrSerialTargetModelTypeToString(dst->targetModel),
+ virDomainChrSerialTargetModelTypeToString(src->targetModel));
+ return false;
+ }
+
if (src->target.port != dst->target.port) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Target serial port %d does not match source %d"),
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/baijing_0022/libvirt.git
git@gitee.com:baijing_0022/libvirt.git
baijing_0022
libvirt
libvirt
master

搜索帮助