bus_manager_send_finished(m, firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec);
+ if (MANAGER_IS_SYSTEM(m) && detect_container() <= 0)
+ watchdog_report_if_missing();
+
log_taint_string(m);
}
return watchdog_ping_now();
}
+void watchdog_report_if_missing(void) {
+ /* If we failed to open the watchdog because the device doesn't exist, report why. If we successfully
+ * opened a device, or opening failed for a different reason, we logged then. But ENOENT failure may
+ * be transient, for example because modules being loaded or the hardware being detected. This
+ * function can be called to log after things have settled down.
+ *
+ * If a device was specified explicitly, raise level. */
+
+ if (watchdog_fd == -ENOENT)
+ log_full_errno(watchdog_device ? LOG_WARNING : LOG_NOTICE,
+ watchdog_fd,
+ "Failed to open %swatchdog device%s%s before the initial transaction completed: %m",
+ watchdog_device ? "" : "any ",
+ watchdog_device ? " " : "",
+ strempty(watchdog_device));
+}
+
void watchdog_close(bool disarm) {
/* Once closed, pinging the device becomes a NOP and we request a new
int watchdog_setup_pretimeout(usec_t usec);
int watchdog_setup_pretimeout_governor(const char *governor);
int watchdog_ping(void);
+void watchdog_report_if_missing(void);
void watchdog_close(bool disarm);
usec_t watchdog_runtime_wait(void);