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: 53fda560dc
This commit is contained in:
Lennart Poettering
2023-03-28 13:39:48 +09:00
committed by Yu Watanabe
parent 1d4f517bba
commit 5f68f63e19
+5 -1
View 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,