diff options
author | Tom Gundersen <teg@jklm.no> | 2014-01-03 16:38:18 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-01-03 16:56:09 +0100 |
commit | 2672953bde548f3648eb6a24dbda415604262cea (patch) | |
tree | 260a620ce5808a406b290f355a427853223be93e /src/network/networkd-link.c | |
parent | efbc88b8ed8a47c3e09f094f8dcb39422f855a01 (diff) |
networkd: improve logging
This gives a bit better messages when a link is added twice.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index f0fb0d93e6..889efc8c2f 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -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")) { |