summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorSusant Sahani <susant@redhat.com>2015-06-11 09:38:19 +0200
committerSusant Sahani <susant@redhat.com>2015-06-11 09:38:19 +0200
commitc8a09ef46302b4bafe36623857a60eafa6b76e2e (patch)
tree8401658ada22be83ef0bab2ff33a402f5829f887 /src/network
parentMerge pull request #3 from threatgrid/more_cgtop_enhancements (diff)
downloadsystemd-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.c10
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;