From 829405f966244257478967a0a9134c4b9515e1ca Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sat, 24 Feb 2018 16:00:01 +0100 Subject: [PATCH] watchdog: Do not emit error message if user has no /dev/watchdog Running Finit on a kernel or system without WDT support built-in should not trigger an error message from Finit. Signed-off-by: Joachim Nilsson --- src/watchdog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/watchdog.c b/src/watchdog.c index 85b49940..fde0ebba 100644 --- a/src/watchdog.c +++ b/src/watchdog.c @@ -95,7 +95,8 @@ int watchdog(char *progname) fd = init(progname, WDT_DEVNODE); if (fd == -1) { - _pe("Failed connecting to watchdog %s", WDT_DEVNODE); + if (ENOENT != errno) + _pe("Failed connecting to watchdog %s", WDT_DEVNODE); _exit(1); }