chiark / gitweb /
treewide: use log_*_errno whenever %m is in the format string
[elogind.git] / src / core / hostname-setup.c
index 74ff64883f51d5224c046cb0fdfc618c88a514f2..72e4c539eff970cb23e0b740a436847aea1adae6 100644 (file)
@@ -64,7 +64,7 @@ int hostname_setup(void) {
                 if (r == -ENOENT)
                         enoent = true;
                 else
-                        log_warning_errno(-r, "Failed to read configured hostname: %m");
+                        log_warning_errno(r, "Failed to read configured hostname: %m");
 
                 hn = NULL;
         } else
@@ -83,7 +83,7 @@ int hostname_setup(void) {
         }
 
         if (sethostname_idempotent(hn) < 0) {
-                log_warning("Failed to set hostname to <%s>: %m", hn);
+                log_warning_errno(errno, "Failed to set hostname to <%s>: %m", hn);
                 return -errno;
         }