1 Star 0 Fork 44

vegbir/iSulad_src

forked from src-openEuler/iSulad 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0023-2260-bugfix-for-rebuild-config.patch 2.75 KB
一键复制 编辑 原始数据 按行查看 历史
zhongtao 提交于 2023-12-21 02:03 . !638 upgrade from upstream
From f08072a865fcf6191d65e7c01e11b99049758c57 Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Tue, 21 Nov 2023 03:27:31 +0000
Subject: [PATCH 23/64] !2260 bugfix for rebuild config * bugfix for rebuild
config
---
src/daemon/modules/container/restore/restore.c | 1 -
src/daemon/modules/runtime/engines/lcr/lcr_rt_ops.c | 5 +----
src/daemon/modules/runtime/runtime.c | 5 +----
3 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/daemon/modules/container/restore/restore.c b/src/daemon/modules/container/restore/restore.c
index f6218fe6..a60b1410 100644
--- a/src/daemon/modules/container/restore/restore.c
+++ b/src/daemon/modules/container/restore/restore.c
@@ -24,7 +24,6 @@
#include <isula_libutils/container_config_v2.h>
#include <isula_libutils/host_config.h>
#include <isula_libutils/log.h>
-#include <isula_libutils/auto_cleanup.h>
#include "isulad_config.h"
diff --git a/src/daemon/modules/runtime/engines/lcr/lcr_rt_ops.c b/src/daemon/modules/runtime/engines/lcr/lcr_rt_ops.c
index 2f42909b..8f7211d7 100644
--- a/src/daemon/modules/runtime/engines/lcr/lcr_rt_ops.c
+++ b/src/daemon/modules/runtime/engines/lcr/lcr_rt_ops.c
@@ -782,7 +782,6 @@ int rt_lcr_rebuild_config(const char *name, const char *runtime, const rt_rebuil
char oci_config_file[PATH_MAX] = { 0 };
struct engine_operation *engine_ops = NULL;
oci_runtime_spec *oci_spec = NULL;
- __isula_auto_free char *json_container = NULL;
__isula_auto_free parser_error err = NULL;
engine_ops = engines_get_handler(runtime);
@@ -836,9 +835,7 @@ int rt_lcr_rebuild_config(const char *name, const char *runtime, const rt_rebuil
WARN("Failed to rename backup old config to config for container %s", name);
}
}
-
- ret = 0;
-
+ ret = nret != 0 ? -1 : 0;
out:
if (engine_ops != NULL && engine_ops->engine_clear_errmsg_op != NULL) {
engine_ops->engine_clear_errmsg_op();
diff --git a/src/daemon/modules/runtime/runtime.c b/src/daemon/modules/runtime/runtime.c
index d9a332af..4a239f0a 100644
--- a/src/daemon/modules/runtime/runtime.c
+++ b/src/daemon/modules/runtime/runtime.c
@@ -470,7 +470,6 @@ out:
int runtime_rebuild_config(const char *name, const char *runtime, const rt_rebuild_config_params_t *params)
{
- int ret = 0;
const struct rt_ops *ops = NULL;
if (name == NULL || runtime == NULL || params == NULL) {
@@ -484,9 +483,7 @@ int runtime_rebuild_config(const char *name, const char *runtime, const rt_rebui
return -1;
}
- ret = ops->rt_rebuild_config(name, runtime, params);
-
- return ret;
+ return ops->rt_rebuild_config(name, runtime, params);
}
int runtime_resize(const char *name, const char *runtime, const rt_resize_params_t *params)
--
2.42.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/vegbir/iSulad_src.git
git@gitee.com:vegbir/iSulad_src.git
vegbir
iSulad_src
iSulad_src
master

搜索帮助