projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea917db
)
networkd: fix reporting errors from hostnamed
author
Michael Marineau
<michael.marineau@coreos.com>
Mon, 21 Jul 2014 23:23:42 +0000
(16:23 -0700)
committer
Tom Gundersen
<teg@jklm.no>
Tue, 29 Jul 2014 20:24:58 +0000
(22:24 +0200)
The return value may be -EINVAL or a positive errno from the dbus
message. Check both ranges, otherwise most errors are silently ignored.
src/network/networkd-link.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-link.c
b/src/network/networkd-link.c
index
3b8b7ed
..
7db71c0
100644
(file)
--- a/
src/network/networkd-link.c
+++ b/
src/network/networkd-link.c
@@
-835,7
+835,9
@@
static int set_hostname_handler(sd_bus *bus, sd_bus_message *m, void *userdata,
r = sd_bus_message_get_errno(m);
if (r < 0)
- log_warning_link(link, "Could not set hostname: %s", strerror(-r));
+ r = -r;
+ if (r > 0)
+ log_warning_link(link, "Could not set hostname: %s", strerror(r));
return 1;
}