summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorTejun Heo <htejun@fb.com>2016-06-03 08:49:05 -0700
committerLennart Poettering <lennart@poettering.net>2016-06-03 17:49:05 +0200
commite57c9ce169a135c0461108075a72bc2bedb299c7 (patch)
treefad36a84a5aa43f047043d47db593a3eea7ffc54 /src/shared
parentac9b215d0cf4b74f2ba1afe341817553a67fe2bb (diff)
core: always use "infinity" for no upper limit instead of "max" (#3417)
Recently added cgroup unified hierarchy support uses "max" in configurations for no upper limit. While consistent with what the kernel uses for no upper limit, it is inconsistent with what systemd uses for other controllers such as memory or pids. There's no point in introducing another term. Update cgroup unified hierarchy support so that "infinity" is the only term that systemd uses for no upper limit.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/bus-unit-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
index 502e98d9dc..bf0b2e89e3 100644
--- a/src/shared/bus-unit-util.c
+++ b/src/shared/bus-unit-util.c
@@ -169,7 +169,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
} else if (STR_IN_SET(field, "MemoryLow", "MemoryHigh", "MemoryMax", "MemoryLimit")) {
uint64_t bytes;
- if (isempty(eq) || streq(eq, "max") || streq(eq, "infinity"))
+ if (isempty(eq) || streq(eq, "infinity"))
bytes = CGROUP_LIMIT_MAX;
else {
r = parse_size(eq, 1024, &bytes);
@@ -306,7 +306,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
return -EINVAL;
}
- if (streq(bandwidth, "max")) {
+ if (streq(bandwidth, "infinity")) {
bytes = CGROUP_LIMIT_MAX;
} else {
r = parse_size(bandwidth, 1000, &bytes);