[PATCH 05/10] net: show enetaddr in lowercase

Holger Schurig holgerschurig at gmail.com
Fri May 30 02:07:31 PDT 2014


"ifconfig" and "ip" from normal Linux userspace shows ethernet addresses
normally in lowercase.  And the %pM format specifier in Linux does that,
too. Conform to this custom formatting.

Signed-off-by: Holger Schurig <holgerschurig at gmail.com>
---
 net/net.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/net.c b/net/net.c
index f54267a..07350ad 100644
--- a/net/net.c
+++ b/net/net.c
@@ -160,7 +160,7 @@ int string_to_ethaddr(const char *str, u8 enetaddr[6])
 
 void ethaddr_to_string(const u8 enetaddr[6], char *str)
 {
-	sprintf(str, "%02X:%02X:%02X:%02X:%02X:%02X",
+	sprintf(str, "%02x:%02x:%02x:%02x:%02x:%02x",
 		 enetaddr[0], enetaddr[1], enetaddr[2], enetaddr[3],
 		 enetaddr[4], enetaddr[5]);
 }
-- 
1.7.10.4




More information about the barebox mailing list