From: Lennart Poettering Date: Fri, 24 Mar 2023 21:41:57 +0000 (+0100) Subject: systemctl: dont's how memory limits that aren't available via D-Bus props X-Git-Tag: v254-rc1~898 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f68f63e19a3f608d81c72718608b9e2a02a45df;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/systemctl/systemctl-show.c b/src/systemctl/systemctl-show.c index f3d09e57e65..71bac12190d 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,