projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52ef5dd
)
hostname-setup: clarify that failures reading /etc/hostname are ignored
author
Lennart Poettering
<lennart@poettering.net>
Fri, 11 Dec 2020 15:43:39 +0000
(16:43 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 15 Dec 2020 16:59:58 +0000
(17:59 +0100)
src/core/hostname-setup.c
patch
|
blob
|
history
diff --git
a/src/core/hostname-setup.c
b/src/core/hostname-setup.c
index 4e20e764a3c9d8215010de533c8e57be078d57f0..6ccaa479de24a52075b86a4995527a928895c3b7 100644
(file)
--- a/
src/core/hostname-setup.c
+++ b/
src/core/hostname-setup.c
@@
-34,12
+34,11
@@
int hostname_setup(void) {
if (!hn) {
r = read_etc_hostname(NULL, &b);
- if (r < 0) {
- if (r == -ENOENT)
- enoent = true;
- else
- log_warning_errno(r, "Failed to read configured hostname: %m");
- } else
+ if (r == -ENOENT)
+ enoent = true;
+ else if (r < 0)
+ log_warning_errno(r, "Failed to read configured hostname, ignoring: %m");
+ else
hn = b;
}