]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: show "Until:" field only for service and scope units
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 Feb 2023 04:26:28 +0000 (13:26 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 Feb 2023 14:04:43 +0000 (23:04 +0900)
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.

src/systemctl/systemctl-show.c

index 589c91a83b08fe4d6c7f25cc3cf99ebe305244f2..66ae9800d40b9f5ba4e05309be04ea859f9373c9 100644 (file)
@@ -2058,6 +2058,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,