Merge pull request #1820 from michich/errno-v2
[v2] treewide: treatment of errno and other cleanups
This commit is contained in:
@@ -61,8 +61,9 @@ int hostname_setup(void) {
|
||||
hn = "localhost";
|
||||
}
|
||||
|
||||
if (sethostname_idempotent(hn) < 0)
|
||||
return log_warning_errno(errno, "Failed to set hostname to <%s>: %m", hn);
|
||||
r = sethostname_idempotent(hn);
|
||||
if (r < 0)
|
||||
return log_warning_errno(r, "Failed to set hostname to <%s>: %m", hn);
|
||||
|
||||
log_info("Set hostname to <%s>.", hn);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user