]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pid1: fix the names of AllowedCPUs= and AllowedMemoryNodes=
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 24 Nov 2019 13:14:43 +0000 (14:14 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 25 Nov 2019 13:02:14 +0000 (14:02 +0100)
The original PR was submitted with CPUSetCpus and CPUSetMems, which was later
changed to AllowedCPUs and AllowedMemmoryNodes everywhere (including the parser
used by systemd-run), but not in the parser for unit files.

Since we already released -rc1, let's keep support for the old names. I think
we can remove it in a release or two if anyone remembers to do that.

Fixes #14126. Follow-up for 047f5d63d7a1ab75073f8485e2f9b550d25b0772.

src/core/load-fragment-gperf.gperf.m4
src/core/load-fragment.c
src/core/load-fragment.h

index 42fc4eaac9d4b65521b3074f19dac98356dee5b8..de08f7d0676b7a04d672e0947460b1e94354cf41 100644 (file)
@@ -166,6 +166,8 @@ $1.WatchdogSignal,               config_parse_signal,                0,
 )m4_dnl
 m4_define(`CGROUP_CONTEXT_CONFIG_ITEMS',
 `$1.Slice,                       config_parse_unit_slice,            0,                             0
+$1.AllowedCPUs,                  config_parse_allowed_cpus,          0,                             offsetof($1, cgroup_context)
+$1.AllowedMemoryNodes,           config_parse_allowed_mems,          0,                             offsetof($1, cgroup_context)
 $1.CPUAccounting,                config_parse_bool,                  0,                             offsetof($1, cgroup_context.cpu_accounting)
 $1.CPUWeight,                    config_parse_cg_weight,             0,                             offsetof($1, cgroup_context.cpu_weight)
 $1.StartupCPUWeight,             config_parse_cg_weight,             0,                             offsetof($1, cgroup_context.startup_cpu_weight)
@@ -173,8 +175,6 @@ $1.CPUShares,                    config_parse_cpu_shares,            0,
 $1.StartupCPUShares,             config_parse_cpu_shares,            0,                             offsetof($1, cgroup_context.startup_cpu_shares)
 $1.CPUQuota,                     config_parse_cpu_quota,             0,                             offsetof($1, cgroup_context)
 $1.CPUQuotaPeriodSec,            config_parse_sec_def_infinity,      0,                             offsetof($1, cgroup_context.cpu_quota_period_usec)
-$1.CPUSetCpus,                   config_parse_cpuset_cpus,           0,                             offsetof($1, cgroup_context)
-$1.CPUSetMems,                   config_parse_cpuset_mems,           0,                             offsetof($1, cgroup_context)
 $1.MemoryAccounting,             config_parse_bool,                  0,                             offsetof($1, cgroup_context.memory_accounting)
 $1.MemoryMin,                    config_parse_memory_limit,          0,                             offsetof($1, cgroup_context)
 $1.DefaultMemoryMin,             config_parse_memory_limit,          0,                             offsetof($1, cgroup_context)
index 0631ea5ce203d639b15126e0d34b2484004654a1..54c71d3579d893a11b09498a62cf96f401c65c73 100644 (file)
@@ -3146,7 +3146,7 @@ int config_parse_cpu_quota(
         return 0;
 }
 
-int config_parse_cpuset_cpus(
+int config_parse_allowed_cpus(
                 const char *unit,
                 const char *filename,
                 unsigned line,
@@ -3165,7 +3165,7 @@ int config_parse_cpuset_cpus(
         return 0;
 }
 
-int config_parse_cpuset_mems(
+int config_parse_allowed_mems(
                 const char *unit,
                 const char *filename,
                 unsigned line,
index f369c4dc4f6eb095d24414a808bea34ac35bb82d..b81887d510408c368a1e3d4c21404421ffa5839b 100644 (file)
@@ -90,8 +90,8 @@ CONFIG_PARSER_PROTOTYPE(config_parse_set_status);
 CONFIG_PARSER_PROTOTYPE(config_parse_namespace_path_strv);
 CONFIG_PARSER_PROTOTYPE(config_parse_temporary_filesystems);
 CONFIG_PARSER_PROTOTYPE(config_parse_cpu_quota);
-CONFIG_PARSER_PROTOTYPE(config_parse_cpuset_cpus);
-CONFIG_PARSER_PROTOTYPE(config_parse_cpuset_mems);
+CONFIG_PARSER_PROTOTYPE(config_parse_allowed_cpus);
+CONFIG_PARSER_PROTOTYPE(config_parse_allowed_mems);
 CONFIG_PARSER_PROTOTYPE(config_parse_protect_home);
 CONFIG_PARSER_PROTOTYPE(config_parse_protect_system);
 CONFIG_PARSER_PROTOTYPE(config_parse_bus_name);