net: add macro for MAC address print
[dpdk.git] / drivers / bus / dpaa / base / fman / netcfg_layer.c
index b7009f2..556d631 100644 (file)
@@ -8,7 +8,7 @@
 #include <dpaa_of.h>
 #include <net/if.h>
 #include <sys/ioctl.h>
-#include <error.h>
+#include <err.h>
 #include <net/if_arp.h>
 #include <assert.h>
 #include <unistd.h>
@@ -47,7 +47,7 @@ dump_netcfg(struct netcfg_info *cfg_ptr)
                       (__if->mac_type == fman_mac_1g) ? "1G" :
                       (__if->mac_type == fman_mac_2_5g) ? "2.5G" : "10G");
 
-               printf("\tmac_addr: %02x:%02x:%02x:%02x:%02x:%02x\n",
+               printf("\tmac_addr: " RTE_ETHER_ADDR_PRT_FMT "\n",
                       (&__if->mac_addr)->addr_bytes[0],
                       (&__if->mac_addr)->addr_bytes[1],
                       (&__if->mac_addr)->addr_bytes[2],
@@ -90,7 +90,7 @@ netcfg_acquire(void)
         */
        skfd = socket(AF_PACKET, SOCK_RAW, 0);
        if (unlikely(skfd < 0)) {
-               error(0, errno, "%s(): open(SOCK_RAW)", __func__);
+               err(0, "%s(): open(SOCK_RAW)", __func__);
                return NULL;
        }