]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: dont's how memory limits that aren't available via D-Bus props
authorLennart Poettering <lennart@poettering.net>
Fri, 24 Mar 2023 21:41:57 +0000 (22:41 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 28 Mar 2023 04:39:48 +0000 (13:39 +0900)
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

src/systemctl/systemctl-show.c

index f3d09e57e65494cead15d062e175080f516569c8..71bac12190df5718d5119831d0e5b73b13a11e05 100644 (file)
@@ -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,