Created attachment 1814440 [details] Proposed patch Description of problem: `wdctl` does not show reboot reason flags when current boot was watchdog triggered. Version-Release number of selected component (if applicable): 2.36.2 and earlier How reproducible: Always. Steps to Reproduce: 1. Install the watchdog daemon: yum install watchdog 2. Uncomment this line in /etc/watchdog.conf: watchdog-device = /dev/watchdog 3. Start the daemon: systemctl start watchdog.service 4. As root, do `echo c > /proc/sysrq-trigger`. This will cause a kernel panic. 5. Wait for the watchdog to reboot the system. 6. Once booted, run `sudo wdctl`. Actual results: Example from a VM: ``` [jose@fedora ~]$ sudo wdctl Device: /dev/watchdog0 Identity: i6300ESB timer [version 0] Timeout: 30 seconds Pre-timeout: 0 seconds FLAG DESCRIPTION STATUS BOOT-STATUS KEEPALIVEPING Keep alive ping reply 1 0 MAGICCLOSE Supports magic close char 0 0 SETTIMEOUT Set timeout (in seconds) 0 0 ``` Expected results: ``` $ sudo wdctl Device: /dev/watchdog0 Identity: i6300ESB timer [version 0] Timeout: 30 seconds Pre-timeout: 0 seconds FLAG DESCRIPTION STATUS BOOT-STATUS CARDRESET Card previously reset the CPU 1 1 KEEPALIVEPING Keep alive ping reply 1 0 MAGICCLOSE Supports magic close char 0 0 SETTIMEOUT Set timeout (in seconds) 0 0 ``` Additional info: Hans De Goede made a patch for this (attached). This patch is what I used in order to get the result provided in `Expected results`.
Applied to the upstream tree http://github.com/karelzak/util-linux/commit/b1b0259fe42aad1bf0997ce1c03a020ce59e38ab