From: Mike Yuan Date: Wed, 29 Oct 2025 18:05:43 +0000 (+0100) Subject: core/execute: remove unused ExecParameters.cgroup_supported X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fd2d8d5752f11f4478b47e209a8cc052605f9aa;p=thirdparty%2Fsystemd.git core/execute: remove unused ExecParameters.cgroup_supported Follow-up for 188286eec6b3af2a13c2ccd86038f74e3d5da72f --- diff --git a/src/core/execute-serialize.c b/src/core/execute-serialize.c index e5a97f59aa1..b7667b00a71 100644 --- a/src/core/execute-serialize.c +++ b/src/core/execute-serialize.c @@ -1121,12 +1121,6 @@ static int exec_parameters_serialize(const ExecParameters *p, const ExecContext if (r < 0) return r; - if (p->cgroup_supported != 0) { - r = serialize_item_format(f, "exec-parameters-cgroup-supported", "%u", (unsigned) p->cgroup_supported); - if (r < 0) - return r; - } - r = serialize_item(f, "exec-parameters-cgroup-path", p->cgroup_path); if (r < 0) return r; @@ -1350,13 +1344,6 @@ static int exec_parameters_deserialize(ExecParameters *p, FILE *f, FDSet *fds) { return r; p->selinux_context_net = r; - } else if ((val = startswith(l, "exec-parameters-cgroup-supported="))) { - unsigned cgroup_supported; - - r = safe_atou(val, &cgroup_supported); - if (r < 0) - return r; - p->cgroup_supported = cgroup_supported; } else if ((val = startswith(l, "exec-parameters-cgroup-path="))) { r = free_and_strdup(&p->cgroup_path, val); if (r < 0) diff --git a/src/core/execute.c b/src/core/execute.c index 76f30b14a8f..db91bc0a58c 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1048,7 +1048,6 @@ void exec_params_dump(const ExecParameters *p, FILE* f, const char *prefix) { "%sRuntimeScope: %s\n" "%sExecFlags: %u\n" "%sSELinuxContextNetwork: %s\n" - "%sCgroupSupportedMask: %u\n" "%sCgroupPath: %s\n" "%sCrededentialsDirectory: %s\n" "%sEncryptedCredentialsDirectory: %s\n" @@ -1061,7 +1060,6 @@ void exec_params_dump(const ExecParameters *p, FILE* f, const char *prefix) { prefix, runtime_scope_to_string(p->runtime_scope), prefix, p->flags, prefix, yes_no(p->selinux_context_net), - prefix, p->cgroup_supported, prefix, p->cgroup_path, prefix, strempty(p->received_credentials_directory), prefix, strempty(p->received_encrypted_credentials_directory), diff --git a/src/core/execute.h b/src/core/execute.h index 8d0f06aeef8..2908c29a373 100644 --- a/src/core/execute.h +++ b/src/core/execute.h @@ -402,7 +402,6 @@ typedef struct ExecParameters { ExecFlags flags; bool selinux_context_net:1; - CGroupMask cgroup_supported; char *cgroup_path; uint64_t cgroup_id; diff --git a/src/core/unit.c b/src/core/unit.c index 0f7fe55f3ce..a85987c74bf 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -5506,7 +5506,6 @@ int unit_set_exec_params(Unit *u, ExecParameters *p) { if (r < 0) return r; - p->cgroup_supported = u->manager->cgroup_supported; p->prefix = u->manager->prefix; SET_FLAG(p->flags, EXEC_PASS_LOG_UNIT|EXEC_CHOWN_DIRECTORIES, MANAGER_IS_SYSTEM(u->manager));