]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/execute: remove unused ExecParameters.cgroup_supported
authorMike Yuan <me@yhndnzj.com>
Wed, 29 Oct 2025 18:05:43 +0000 (19:05 +0100)
committerMike Yuan <me@yhndnzj.com>
Thu, 30 Oct 2025 15:12:13 +0000 (16:12 +0100)
Follow-up for 188286eec6b3af2a13c2ccd86038f74e3d5da72f

src/core/execute-serialize.c
src/core/execute.c
src/core/execute.h
src/core/unit.c

index e5a97f59aa1008203a4ca967a019d549ff411258..b7667b00a7181bd4aeb963196c95496ebfb3eb50 100644 (file)
@@ -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)
index 76f30b14a8feaeac105b0e4c8c00fa32902c6cd6..db91bc0a58cdd97b39584a73de9c4c9825bcf989 100644 (file)
@@ -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),
index 8d0f06aeef813da0d4dd8d953f7d4dacaa5f9039..2908c29a3735a7ccde85219afe8a142dce92ed87 100644 (file)
@@ -402,7 +402,6 @@ typedef struct ExecParameters {
         ExecFlags flags;
         bool selinux_context_net:1;
 
-        CGroupMask cgroup_supported;
         char *cgroup_path;
         uint64_t cgroup_id;
 
index 0f7fe55f3ceeb2b2b0aa73760ad8ac326e7a1fda..a85987c74bfc915b96d3cba40c642ad655213d83 100644 (file)
@@ -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));