1 Star 0 Fork 43

zhongtao/src-iSulad

forked from src-openEuler/iSulad 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0073-bugfix-cdi-version-check.patch 1.94 KB
一键复制 编辑 原始数据 按行查看 历史
liuxu 提交于 2024-04-20 19:31 . upgrade from upstream
From 4d8a89e0a3700253db044f6641d91ab10ad6ce10 Mon Sep 17 00:00:00 2001
From: liuxu <[email protected]>
Date: Sat, 20 Apr 2024 19:36:55 +0800
Subject: [PATCH 73/73] bugfix: cdi version check
Signed-off-by: liuxu <[email protected]>
---
src/daemon/modules/device/cdi/behavior/cdi_spec.c | 2 +-
src/daemon/modules/device/cdi/behavior/cdi_version.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/daemon/modules/device/cdi/behavior/cdi_spec.c b/src/daemon/modules/device/cdi/behavior/cdi_spec.c
index 235b1863..8783debc 100644
--- a/src/daemon/modules/device/cdi/behavior/cdi_spec.c
+++ b/src/daemon/modules/device/cdi/behavior/cdi_spec.c
@@ -199,7 +199,7 @@ static int cdi_spec_init(struct cdi_cache_spec *s)
return -1;
}
if (version_result) {
- ERROR("The spec version must be at least v%s", min_version);
+ ERROR("The %s spec version must be at least v%s", s->path, min_version);
return -1;
}
diff --git a/src/daemon/modules/device/cdi/behavior/cdi_version.c b/src/daemon/modules/device/cdi/behavior/cdi_version.c
index 882a965e..550f3107 100644
--- a/src/daemon/modules/device/cdi/behavior/cdi_version.c
+++ b/src/daemon/modules/device/cdi/behavior/cdi_version.c
@@ -138,9 +138,9 @@ static struct required_version_map g_valid_spec_versions[VALID_SPEC_VERSIONS_LEN
{CDI_V010, NULL},
{CDI_V020, NULL},
{CDI_V030, NULL},
- {CDI_V040, requires_v060},
+ {CDI_V040, requires_v040},
{CDI_V050, requires_v050},
- {CDI_V060, requires_v040}
+ {CDI_V060, requires_v060}
};
const char *cdi_minimum_required_version(cdi_spec *spec)
@@ -166,7 +166,7 @@ const char *cdi_minimum_required_version(cdi_spec *spec)
min_version = g_valid_spec_versions[i].version;
}
}
- if (strcmp(min_version, CDI_CURRENT_VERSION)) {
+ if (strcmp(min_version, CDI_CURRENT_VERSION) == 0) {
break;
}
}
--
2.34.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/taotao-sauce/src-iSulad.git
[email protected]:taotao-sauce/src-iSulad.git
taotao-sauce
src-iSulad
src-iSulad
master

搜索帮助