]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: vlan improve logging 297/head
authorSusant Sahani <susant@redhat.com>
Mon, 15 Jun 2015 03:34:28 +0000 (09:04 +0530)
committerSusant Sahani <susant@redhat.com>
Fri, 19 Jun 2015 06:33:38 +0000 (12:03 +0530)
Replaces strerror() usage with log_netdev_error_errno()

src/network/networkd-netdev-vlan.c

index d53e7beaac53f43c7e039f9162e4d722b83e05ba..195d1a944e522a1c20d3570020134673f6c394b7 100644 (file)
@@ -34,12 +34,8 @@ static int netdev_vlan_fill_message_create(NetDev *netdev, Link *link, sd_netlin
 
         if (v->id <= VLANID_MAX) {
                 r = sd_netlink_message_append_u16(req, IFLA_VLAN_ID, v->id);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_VLAN_ID attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_VLAN_ID attribute: %m");
         }
 
         return 0;