X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=watchdog.c;fp=watchdog.c;h=ec10ba6188ca39138a46b805becc91a18ba2c059;hp=97c8337e0b31ee696f484483e5871be94a2cf408;hb=fa5ce1c2b4fe3fa6bb4bbc6697961655b952d8d4;hpb=6900a6be63c63707c304cfe79c7469725fd07c11 diff --git a/watchdog.c b/watchdog.c index 97c8337..ec10ba6 100644 --- a/watchdog.c +++ b/watchdog.c @@ -37,7 +37,7 @@ void watchdog_ping(void) { DEBUG(4, "Ping\n"); if (wdt_fd >= 0 && write(wdt_fd, "X", 1) < 0) - ERROR("WDT failed to write: %s\n", strerror(errno)); + ERROR("WDT failed to write: %m\n"); } static void watchdog_timeout_cb(struct uloop_timeout *t) @@ -76,10 +76,10 @@ static void watchdog_close(void) return; if (write(wdt_fd, "V", 1) < 0) - ERROR("WDT failed to write release: %s\n", strerror(errno)); + ERROR("WDT failed to write release: %m\n"); if (close(wdt_fd) == -1) - ERROR("WDT failed to close watchdog: %s\n", strerror(errno)); + ERROR("WDT failed to close watchdog: %m\n"); wdt_fd = -1; }