X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftest%2Ftest-watchdog.c;h=2e5d0c3aaebfb633784a1504fba8893979f75a30;hb=adfe5671ef794099068038dfccbf1eb5134433c8;hp=ccb1854708047e3f22813467bee8ec5425a0c5b4;hpb=379079ba6b06e82de9a8f0025456308a34b4b115;p=elogind.git diff --git a/src/test/test-watchdog.c b/src/test/test-watchdog.c index ccb185470..2e5d0c3aa 100644 --- a/src/test/test-watchdog.c +++ b/src/test/test-watchdog.c @@ -20,7 +20,6 @@ ***/ #include -#include #include "watchdog.h" #include "log.h" @@ -35,13 +34,13 @@ int main(int argc, char *argv[]) { r = watchdog_set_timeout(&t); if (r < 0) - log_warning("Failed to open watchdog: %s", strerror(-r)); + log_warning_errno(r, "Failed to open watchdog: %m"); for (i = 0; i < 5; i++) { log_info("Pinging..."); r = watchdog_ping(); if (r < 0) - log_warning("Failed to ping watchdog: %s", strerror(-r)); + log_warning_errno(r, "Failed to ping watchdog: %m"); usleep(t/2); }