chiark / gitweb /
core: convert log_unit_*() to log_unit_*_errno()
[elogind.git] / src / delta / delta.c
index 2fdbeeae81e38c66b751a533301a6256e5d8a792..1dc81175b5671d1682184a4bfeca39cecfab8edb 100644 (file)
@@ -159,7 +159,7 @@ static int notify_override_unchanged(const char *f) {
 
 static int found_override(const char *top, const char *bottom) {
         _cleanup_free_ char *dest = NULL;
-        int k, r;
+        int k;
         pid_t pid;
 
         assert(top);
@@ -194,10 +194,7 @@ static int found_override(const char *top, const char *bottom) {
                 _exit(1);
         }
 
-        r = wait_for_terminate(pid, NULL);
-        if (r < 0)
-                log_warning("Failed to wait for diff: %s", strerror(-r));
-
+        wait_for_terminate_and_warn("diff", pid);
         putchar('\n');
 
         return k;
@@ -230,7 +227,7 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
 
         r = get_files_in_directory(path, &list);
         if (r < 0){
-                log_error("Failed to enumerate %s: %s", path, strerror(-r));
+                log_error_errno(r, "Failed to enumerate %s: %m", path);
                 return r;
         }