summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-03-24 22:41:57 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-03-28 13:39:48 +0900
commit5f68f63e19a3f608d81c72718608b9e2a02a45df (patch)
tree22391a4fbfcfc7777bcd45454f61a67a2b70ddf4 /src/systemctl
parent1d4f517bbadb0670c9751d6eb020ab06d1044933 (diff)
downloadsystemd-5f68f63e19a3f608d81c72718608b9e2a02a45df.tar.gz
systemctl: dont's how memory limits that aren't available via D-Bus props
When using an old systemctl on a new PID 1 the "startup" memory limit props are not initialized and currently be shown in status output as zero, even though there's code to suppress the output in that case. Alas it doesn't work, because the relevant fields are not marked as "unset"... Fix that. Follow-up for: 53fda560dc2c66502da7ad68db7d79b515a3601a
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl-show.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/systemctl/systemctl-show.c b/src/systemctl/systemctl-show.c
index f3d09e57e6..71bac12190 100644
--- a/src/systemctl/systemctl-show.c
+++ b/src/systemctl/systemctl-show.c
@@ -2061,10 +2061,14 @@ static int show_one(
.runtime_max_sec = USEC_INFINITY,
.memory_current = UINT64_MAX,
.memory_high = CGROUP_LIMIT_MAX,
+ .startup_memory_high = CGROUP_LIMIT_MAX,
.memory_max = CGROUP_LIMIT_MAX,
+ .startup_memory_max = CGROUP_LIMIT_MAX,
.memory_swap_max = CGROUP_LIMIT_MAX,
+ .startup_memory_swap_max = CGROUP_LIMIT_MAX,
.memory_zswap_max = CGROUP_LIMIT_MAX,
- .memory_limit = UINT64_MAX,
+ .startup_memory_zswap_max = CGROUP_LIMIT_MAX,
+ .memory_limit = CGROUP_LIMIT_MAX,
.memory_available = CGROUP_LIMIT_MAX,
.cpu_usage_nsec = UINT64_MAX,
.tasks_current = UINT64_MAX,