path: root/commands
diff options
authorAhmad Fatoum <>2019-10-23 18:56:00 +0200
committerSascha Hauer <>2019-10-29 10:23:43 +0100
commit9ba3943ce613c179740957e85405b4c832323ddb (patch)
tree079d2e75e55bb80dfa6e85d35491a13ff028b100 /commands
parentc2d167823588708c9f8f68c7db111ce146e19e3f (diff)
watchdog: export API to configure watchdogs by name
So far watchdog users could only configure the watchdog with the highest priority. In preparation for having the wd command configure a watchdog by name, extend watchdog_set_timeout with a struct watchdog *parameter and export functions to query default watchdog and to find watchdog by name. No functional change. Signed-off-by: Ahmad Fatoum <> Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'commands')
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/wd.c b/commands/wd.c
index 26823f8..f857291 100644
--- a/commands/wd.c
+++ b/commands/wd.c
@@ -34,7 +34,7 @@ static int do_wd(int argc, char *argv[])
- rc = watchdog_set_timeout(timeout);
+ rc = watchdog_set_timeout(watchdog_get_default(), timeout);
if (rc < 0) {
switch (rc) {
case -EINVAL: