From 2bfb07b22ff1cce4f663740bff202bd65f041916 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 22 Feb 2023 13:26:28 +0900 Subject: [PATCH] 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) --- src/systemctl/systemctl-show.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/systemctl/systemctl-show.c b/src/systemctl/systemctl-show.c index 281cf62b20..d45fb9c3f2 100644 --- a/src/systemctl/systemctl-show.c +++ b/src/systemctl/systemctl-show.c @@ -2024,6 +2024,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,