1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-21 09:33:57 +03:00

systemctl: show "Until:" field only for service and scope units

Only service and scope units have RuntimeMaxUSec bus property.
To suppress the "Until:" field for other unit types, the entry must be
initialized with USEC_INFINITY.

Fixes #26473.

(cherry picked from commit b59052be26)
(cherry picked from commit 2bfb07b22f)
(cherry picked from commit 028cee00dd)
This commit is contained in:
Yu Watanabe 2023-02-22 13:26:28 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 3339b23f4c
commit e385eb57dc

View File

@ -1966,6 +1966,7 @@ static int show_one(
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_set_free_ Set *found_properties = NULL;
_cleanup_(unit_status_info_free) UnitStatusInfo info = {
.runtime_max_sec = USEC_INFINITY,
.memory_current = UINT64_MAX,
.memory_high = CGROUP_LIMIT_MAX,
.memory_max = CGROUP_LIMIT_MAX,