]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgroup: Rename effective limits internal table
authorMichal Koutný <mkoutny@suse.com>
Mon, 22 Jan 2024 15:58:18 +0000 (16:58 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 22 Jan 2024 22:02:37 +0000 (22:02 +0000)
Post-merge fixup of commit 4fb0d2dc14 ("cgroup: Add EffectiveMemoryMax=,
EffectiveMemoryHigh= and EffectiveTasksMax= properties"), no functional
change intended.

src/core/cgroup.c
src/core/cgroup.h
src/core/dbus-unit.c

index e7585c3c0189467dc749e971023a7b91a6f8f377..f82de9b673b3a9b80e27c839ed4377f76850922c 100644 (file)
@@ -5032,10 +5032,10 @@ static const char* const cgroup_memory_accounting_metric_table[_CGROUP_MEMORY_AC
 
 DEFINE_STRING_TABLE_LOOKUP(cgroup_memory_accounting_metric, CGroupMemoryAccountingMetric);
 
-static const char *const cgroup_limit_type_table[_CGROUP_LIMIT_TYPE_MAX] = {
+static const char *const cgroup_effective_limit_type_table[_CGROUP_LIMIT_TYPE_MAX] = {
         [CGROUP_LIMIT_MEMORY_MAX]  = "EffectiveMemoryMax",
         [CGROUP_LIMIT_MEMORY_HIGH] = "EffectiveMemoryHigh",
         [CGROUP_LIMIT_TASKS_MAX]   = "EffectiveTasksMax",
 };
 
-DEFINE_STRING_TABLE_LOOKUP(cgroup_limit_type, CGroupLimitType);
+DEFINE_STRING_TABLE_LOOKUP(cgroup_effective_limit_type, CGroupLimitType);
index c56979de01fd331564b2af6716b2ae3aa5111892..0e90b6bd22c25c55a46ab0421e5e45d0183a10c8 100644 (file)
@@ -448,8 +448,8 @@ CGroupIPAccountingMetric cgroup_ip_accounting_metric_from_string(const char *s)
 const char* cgroup_io_accounting_metric_to_string(CGroupIOAccountingMetric m) _const_;
 CGroupIOAccountingMetric cgroup_io_accounting_metric_from_string(const char *s) _pure_;
 
-const char* cgroup_limit_type_to_string(CGroupLimitType m) _const_;
-CGroupLimitType cgroup_limit_type_from_string(const char *s) _pure_;
+const char* cgroup_effective_limit_type_to_string(CGroupLimitType m) _const_;
+CGroupLimitType cgroup_effective_limit_type_from_string(const char *s) _pure_;
 
 const char* cgroup_memory_accounting_metric_to_string(CGroupMemoryAccountingMetric m) _const_;
 CGroupMemoryAccountingMetric cgroup_memory_accounting_metric_from_string(const char *s) _pure_;
index 7aa44b2393e445ec83d050473bad4c249e5fe8da..83d2302faadf4b0627237d9e2e5ddf0cb918a7f2 100644 (file)
@@ -1443,7 +1443,7 @@ static int property_get_effective_limit(
         assert(reply);
         assert(property);
 
-        assert_se((type = cgroup_limit_type_from_string(property)) >= 0);
+        assert_se((type = cgroup_effective_limit_type_from_string(property)) >= 0);
         (void) unit_get_effective_limit(u, type, &value);
         return sd_bus_message_append(reply, "t", value);
 }