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 <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2018-02-26 23:05:24 +01:00
1 parent 72526d9e88
commit 829405f966
1 file changed
+2 -1
+2 -1
View File
@@ -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);
}