summaryrefslogtreecommitdiff
path: root/src/network/networkd-netdev-veth.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-06-10 15:08:48 +0200
committerLennart Poettering <lennart@poettering.net>2015-06-10 15:08:48 +0200
commit251811f69b5e21f2405665452dd01a9085dea229 (patch)
tree631ce8a4e969f1c081d6513e7a898c4045bb69db /src/network/networkd-netdev-veth.c
parentd16b35b43d686de8c9e88552fb373b88b35aa943 (diff)
parent7676666c6a4e0c49ce56ae600854d01a14b2338f (diff)
Merge pull request #133 from ssahani/net
networkd: vxlan improve logging
Diffstat (limited to 'src/network/networkd-netdev-veth.c')
-rw-r--r--src/network/networkd-netdev-veth.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/network/networkd-netdev-veth.c b/src/network/networkd-netdev-veth.c
index 9e9e1225e7..7bb02d1ae1 100644
--- a/src/network/networkd-netdev-veth.c
+++ b/src/network/networkd-netdev-veth.c
@@ -35,12 +35,8 @@ static int netdev_veth_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m
assert(m);
r = sd_rtnl_message_open_container(m, VETH_INFO_PEER);
- if (r < 0) {
- log_netdev_error(netdev,
- "Could not append VETH_INFO_PEER attribute: %s",
- strerror(-r));
- return r;
- }
+ if (r < 0)
+ return log_netdev_error_errno(netdev, r, "Could not append VETH_INFO_PEER attribute: %m");
if (v->ifname_peer) {
r = sd_rtnl_message_append_string(m, IFLA_IFNAME, v->ifname_peer);
@@ -50,21 +46,13 @@ static int netdev_veth_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m
if (v->mac_peer) {
r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, v->mac_peer);
- if (r < 0) {
- log_netdev_error(netdev,
- "Could not append IFLA_ADDRESS attribute: %s",
- strerror(-r));
- return r;
- }
+ if (r < 0)
+ return log_netdev_error_errno(netdev, r, "Could not append IFLA_ADDRESS attribute: %m");
}
r = sd_rtnl_message_close_container(m);
- if (r < 0) {
- log_netdev_error(netdev,
- "Could not append IFLA_INFO_DATA attribute: %s",
- strerror(-r));
- return r;
- }
+ if (r < 0)
+ return log_netdev_error_errno(netdev, r, "Could not append IFLA_INFO_DATA attribute: %m");
return r;
}