Skip to content

Commit

Permalink
move CGROUP2_SUPER_MAGIC define to cgroup.c
Browse files Browse the repository at this point in the history
Signed-off-by: zhongtao <[email protected]>
  • Loading branch information
zhongtao committed Oct 26, 2024
1 parent 74d748a commit d0bb2c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/daemon/common/cgroup/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions src/daemon/common/cgroup/cgroup_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d0bb2c0

Please sign in to comment.