From 2e157cd033f4e445c0ff23527919420e940a2ddd Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 2 Jan 2024 14:51:56 +0100 Subject: [PATCH] Add more debug messages for device add and init Signed-off-by: Joachim Wiberg --- src/wdt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wdt.c b/src/wdt.c index 13eb93b..5ca8158 100644 --- a/src/wdt.c +++ b/src/wdt.c @@ -657,8 +657,11 @@ int wdt_init(uev_ctx_t *ctx, const char *name) if (name) { /* Check if already in .conf file */ - if (!find(name)) + if (!find(name)) { + DEBUG("Adding command line device %s, interval %d, timeout %d, safe-exit %d", + name, period, timeout, magic); wdt_add(name, period, timeout, magic, 1); + } } TAILQ_FOREACH(dev, &devices, link) { @@ -694,6 +697,7 @@ int wdt_init(uev_ctx_t *ctx, const char *name) /* If user did not provide '-t' interval, set to half WDT timeout */ if (!dev->interval) { + DEBUG("Missing interval, calculating: %d / 2", dev->timeout); dev->interval = dev->timeout / 2; if (!dev->interval) dev->interval = 1;