diff options
author | Susant Sahani <susant@redhat.com> | 2015-06-11 13:08:19 +0530 |
---|---|---|
committer | Susant Sahani <susant@redhat.com> | 2015-06-11 13:08:19 +0530 |
commit | c8a09ef46302b4bafe36623857a60eafa6b76e2e (patch) | |
tree | 8401658ada22be83ef0bab2ff33a402f5829f887 /src/network/networkd-netdev-macvlan.c | |
parent | 37c47e5e5b8e47dd886ed6e8355b1203082b4a3e (diff) |
networkd: macvlan improve logging
Replace strerror() usage with log_netdev_error_errno()
Diffstat (limited to 'src/network/networkd-netdev-macvlan.c')
-rw-r--r-- | src/network/networkd-netdev-macvlan.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/network/networkd-netdev-macvlan.c b/src/network/networkd-netdev-macvlan.c index 5f41f1c865..a8bf6e6bb7 100644 --- a/src/network/networkd-netdev-macvlan.c +++ b/src/network/networkd-netdev-macvlan.c @@ -44,13 +44,9 @@ static int netdev_macvlan_fill_message_create(NetDev *netdev, Link *link, sd_rtn assert(netdev->ifname); if (m->mode != _NETDEV_MACVLAN_MODE_INVALID) { - r = sd_rtnl_message_append_u32(req, IFLA_MACVLAN_MODE, m->mode); - if (r < 0) { - log_netdev_error(netdev, - "Could not append IFLA_MACVLAN_MODE attribute: %s", - strerror(-r)); - return r; - } + r = sd_rtnl_message_append_u32(req, IFLA_MACVLAN_MODE, m->mode); + if (r < 0) + return log_netdev_error_errno(netdev, r, "Could not append IFLA_MACVLAN_MODE attribute: %m"); } return 0; |