]> git.ipfire.org Git - thirdparty/util-linux.git/commit
wdctl: use only sysfs if sufficient
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 13 Oct 2023 14:44:51 +0000 (16:44 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sat, 14 Oct 2023 10:58:04 +0000 (12:58 +0200)
commit6de3def84cf48b68b79d0cc4b5e1d2696e0484d1
tree99a9f8f7c2b5356ed1b8682bd6391103d9db9a7e
parentf3fd64111c28de1ecd47f7cd519120ffa531800d
wdctl: use only sysfs if sufficient

Also avoid opening device if nowayout is set.

Opening the device node starts the watchdog.
With 'nowayout' enabled unstoppably.

Also the device node can only be opened once at the same time which can
be problematic.

Prefer to retrieve the information via sysfs which does not have such
problems.

Fixes #2543

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
sys-utils/wdctl.c