chiark / gitweb /
networkctl: properly format MAC addresses
authorLennart Poettering <lennart@poettering.net>
Tue, 12 Aug 2014 13:08:09 +0000 (15:08 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 12 Aug 2014 13:08:09 +0000 (15:08 +0200)
src/network/networkctl.c

index d5d3c80a3cb269bebc12c058c84b634ed4da67dd..7ae880423c6d7679433f296426af56ec36c6aafd 100644 (file)
@@ -355,15 +355,8 @@ static int link_status(char **args, unsigned n) {
                 if (model)
                         printf("       Model: %s\n", model);
 
-                if (have_mac) {
-                        _cleanup_free_ char *h = NULL;
-
-                        h = hexmem(&e, sizeof(e));
-                        if (!h)
-                                return log_oom();
-
-                        printf("  HW Address: %s\n", h);
-                }
+                if (have_mac)
+                        printf("  HW Address: %s\n", ether_ntoa(&e));
 
                 if (mtu > 0)
                         printf("         MTU: %u\n", mtu);