networkd: improve logging

This gives a bit better messages when a link is added twice.
This commit is contained in:
Tom Gundersen
2014-01-03 16:56:09 +01:00
parent efbc88b8ed
commit 2672953bde
2 changed files with 11 additions and 10 deletions
+2 -4
View File
@@ -102,13 +102,11 @@ int link_add(Manager *m, struct udev_device *device) {
ifindex = udev_device_get_ifindex(device);
link = hashmap_get(m->links, &ifindex);
if (link)
return 0;
return -EEXIST;
r = link_new(m, device, &link);
if (r < 0) {
log_error("Could not create link: %s", strerror(-r));
if (r < 0)
return r;
}
devtype = udev_device_get_devtype(device);
if (streq_ptr(devtype, "bridge")) {