diff options
author | Susant Sahani <susant@redhat.com> | 2015-06-11 09:38:19 +0200 |
---|---|---|
committer | Susant Sahani <susant@redhat.com> | 2015-06-11 09:38:19 +0200 |
commit | c8a09ef46302b4bafe36623857a60eafa6b76e2e (patch) | |
tree | 8401658ada22be83ef0bab2ff33a402f5829f887 /src/network | |
parent | Merge pull request #3 from threatgrid/more_cgtop_enhancements (diff) | |
download | systemd-c8a09ef46302b4bafe36623857a60eafa6b76e2e.tar.xz systemd-c8a09ef46302b4bafe36623857a60eafa6b76e2e.zip |
networkd: macvlan improve logging
Replace strerror() usage with log_netdev_error_errno()
Diffstat (limited to '')
-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; |