blob: 01f25aee7a54cae87c8d8460402c7d4310c95a17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
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
|