[systemd-commits] src/network
Tom Gundersen
tomegun at kemper.freedesktop.org
Tue Jul 29 13:25:48 PDT 2014
src/network/networkd-link.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 70b34f5de86809991d6753ba486b88481ceab817
Author: Michael Marineau <michael.marineau at coreos.com>
Date: Mon Jul 21 16:23:42 2014 -0700
networkd: fix reporting errors from hostnamed
The return value may be -EINVAL or a positive errno from the dbus
message. Check both ranges, otherwise most errors are silently ignored.
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 3b8b7ed..7db71c0 100644
--- 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;
}
More information about the systemd-commits
mailing list