]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: fix SoftRebootsCount property signature
authorLuca Boccassi <luca.boccassi@gmail.com>
Wed, 10 Jun 2026 17:56:38 +0000 (18:56 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 11 Jun 2026 07:43:09 +0000 (09:43 +0200)
The SoftRebootsCount entry in the boot-times map declared signature "t" but the
manager exports it as "u". The mismatch was harmless while the declared signature
was never checked, but becomes a dropped property once it is enforced. Declare "u".

Follow-up for 259046cfe8de29c44070b596fe9e0471e931cbc4

src/analyze/analyze-time-data.c
src/analyze/analyze-time-data.h

index 70332b0f691add012257df77277892199d9328ff..54f9acbbff93e6c6d3907f02bb745fe23164a9ae 100644 (file)
@@ -56,7 +56,7 @@ int acquire_boot_times(sd_bus *bus, bool require_finished, BootTimes **ret) {
                 { "InitRDGeneratorsFinishTimestampMonotonic", "t", NULL, offsetof(BootTimes, initrd_generators_finish_time) },
                 { "InitRDUnitsLoadStartTimestampMonotonic",   "t", NULL, offsetof(BootTimes, initrd_unitsload_start_time)   },
                 { "InitRDUnitsLoadFinishTimestampMonotonic",  "t", NULL, offsetof(BootTimes, initrd_unitsload_finish_time)  },
-                { "SoftRebootsCount",                         "t", NULL, offsetof(BootTimes, soft_reboots_count)            },
+                { "SoftRebootsCount",                         "u", NULL, offsetof(BootTimes, soft_reboots_count)            },
                 {},
         };
         _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
@@ -212,7 +212,7 @@ int pretty_boot_time(sd_bus *bus, char **ret) {
                 return log_oom();
         if (timestamp_is_set(t->initrd_time) && !strextend(&text, FORMAT_TIMESPAN(t->userspace_time - t->initrd_time, USEC_PER_MSEC), " (initrd) + "))
                 return log_oom();
-        if (t->soft_reboots_count > 0 && strextendf(&text, "%s (soft reboot #%" PRIu64 ") + ", FORMAT_TIMESPAN(t->userspace_time, USEC_PER_MSEC), t->soft_reboots_count) < 0)
+        if (t->soft_reboots_count > 0 && strextendf(&text, "%s (soft reboot #%" PRIu32 ") + ", FORMAT_TIMESPAN(t->userspace_time, USEC_PER_MSEC), t->soft_reboots_count) < 0)
                 return log_oom();
 
         if (!strextend(&text, FORMAT_TIMESPAN(t->finish_time - t->userspace_time, USEC_PER_MSEC), " (userspace) "))
index b9dcc46d6c3c9b4414215c7e4883bd8a382708fe..1924409556994c8bcd52e19bb6bf82f6a2f60e88 100644 (file)
@@ -26,7 +26,7 @@ typedef struct BootTimes {
         usec_t initrd_unitsload_start_time;
         usec_t initrd_unitsload_finish_time;
         /* Not strictly a timestamp, but we are going to show it next to the other timestamps */
-        uint64_t soft_reboots_count;
+        uint32_t soft_reboots_count;
 
         /*
          * If we're analyzing the user instance, all timestamps will be offset by its own start-up timestamp,