1 Star 0 Fork 49

albatross/oe_src_iSulad

forked from src-openEuler/iSulad 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0143-move-CGROUP2_SUPER_MAGIC-define-to-cgroup.c.patch 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
liuxu 提交于 2024-11-25 16:34 +08:00 . upgrade from upstream
From d0bb2c00769ab41ada532a04338b91032d7ada2e Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Sat, 26 Oct 2024 16:59:09 +1400
Subject: [PATCH 143/156] move CGROUP2_SUPER_MAGIC define to cgroup.c
Signed-off-by: zhongtao <zhongtao17@huawei.com>
---
src/daemon/common/cgroup/cgroup.c | 4 ++++
src/daemon/common/cgroup/cgroup_v2.c | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/daemon/common/cgroup/cgroup.c b/src/daemon/common/cgroup/cgroup.c
index 77fafdae..a6846c03 100644
--- a/src/daemon/common/cgroup/cgroup.c
+++ b/src/daemon/common/cgroup/cgroup.c
@@ -36,6 +36,10 @@
#define CGROUP_SUPER_MAGIC 0x27e0eb
#endif
+#ifndef CGROUP2_SUPER_MAGIC
+#define CGROUP2_SUPER_MAGIC 0x63677270
+#endif
+
static cgroup_ops g_cgroup_ops;
static int get_cgroup_version_for_init(void)
diff --git a/src/daemon/common/cgroup/cgroup_v2.c b/src/daemon/common/cgroup/cgroup_v2.c
index ce72e6c4..078425d2 100644
--- a/src/daemon/common/cgroup/cgroup_v2.c
+++ b/src/daemon/common/cgroup/cgroup_v2.c
@@ -52,10 +52,6 @@
#define CGROUP2_CPUSET_CPUS_EFFECTIVE_PATH CGROUP_MOUNTPOINT"/cpuset.cpus.effective"
#define CGROUP2_CPUSET_MEMS_EFFECTIVE_PATH CGROUP_MOUNTPOINT"/cpuset.mems.effective"
-#ifndef CGROUP2_SUPER_MAGIC
-#define CGROUP2_SUPER_MAGIC 0x63677270
-#endif
-
static int get_value_ull_v2(const char *content, const char *match, void *result)
{
uint64_t ull_result = 0;
--
2.34.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jade_t/iSulad.git
git@gitee.com:jade_t/iSulad.git
jade_t
iSulad
oe_src_iSulad
master

搜索帮助