chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemctl: show unit file preset state in "systemctl status" output"
[elogind.git]
/
src
/
core
/
hostname-setup.c
diff --git
a/src/core/hostname-setup.c
b/src/core/hostname-setup.c
index f81103a8103eb48aa44c1f1c14c97937392d25df..6664e8952c2b30de430f4b241d0d307f78e30a87 100644
(file)
--- a/
src/core/hostname-setup.c
+++ b/
src/core/hostname-setup.c
@@
-82,10
+82,8
@@
int hostname_setup(void) {
hn = "localhost";
}
hn = "localhost";
}
- if (sethostname_idempotent(hn) < 0) {
- log_warning("Failed to set hostname to <%s>: %m", hn);
- return -errno;
- }
+ if (sethostname_idempotent(hn) < 0)
+ return log_warning_errno(errno, "Failed to set hostname to <%s>: %m", hn);
log_info("Set hostname to <%s>.", hn);
return 0;
log_info("Set hostname to <%s>.", hn);
return 0;