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-manager.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-manager.c')
-rw-r--r-- | src/network/networkd-manager.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index e9944973ad..11c3efe901 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -143,14 +143,17 @@ static int manager_process_link(Manager *m, struct udev_device *device) { link_free(link); } else { - log_debug("%s: link added", udev_device_get_sysname(device)); - r = link_add(m, device); if (r < 0) { - log_error("Could not handle link %s: %s", - udev_device_get_sysname(device), - strerror(-r)); - } + if (r == -EEXIST) + log_debug("%s: link already exists, ignoring", + udev_device_get_sysname(device)); + else + log_error("%s: could not handle link: %s", + udev_device_get_sysname(device), + strerror(-r)); + } else + log_debug("%s: link added", udev_device_get_sysname(device)); } return 0; |