if (r == -ENOENT)
enoent = true;
else
- log_warning("Failed to read configured hostname: %s", strerror(-r));
+ log_warning_errno(r, "Failed to read configured hostname: %m");
hn = NULL;
} else
}
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;
}