X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=watchdog.c;h=ec10ba6188ca39138a46b805becc91a18ba2c059;hp=97c8337e0b31ee696f484483e5871be94a2cf408;hb=67eb7e68165bfa29ab57eb82f3e40eca17662365;hpb=e5e99c463e0ef3e4ad7ba8cea4125183073fabb1 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; }