1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-11 04:58:19 +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 b59052be261523721a86caf4ef820e63f03e26a4)
(cherry picked from commit 2bfb07b22ff1cce4f663740bff202bd65f041916)
(cherry picked from commit 028cee00dd5e37ef94ce11c06d7fdc61dd2a6f47)
(cherry picked from commit e385eb57dc755716012ec55e8aa2d34252886f69)
This commit is contained in:
Yu Watanabe 2023-02-22 13:26:28 +09:00 committed by Luca Boccassi
parent 7cafc74085
commit 92f8a86f2b

View File

@ -1944,6 +1944,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,