From 6f9f8fd740d30111953c38944214f2857cca5894 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Fri, 27 Feb 2009 06:20:04 -0700 Subject: [PATCH] Correct Device Serial Number output We are currently printing the Device Serial Number backwards. Ben Hutchings noticed that the DSN was an EUI-64 (derived from a MAC address), but printed backwards. Before: Capabilities: [140] Device Serial Number 97-62-84-ff-ff-3b-1f-00 After: Capabilities: [140] Device Serial Number 00-1f-3b-ff-ff-84-62-97 The MAC address is: wlan0 Link encap:Ethernet HWaddr 00:1f:3b:84:62:97 Signed-off-by: Matthew Wilcox --- ls-ecaps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ls-ecaps.c b/ls-ecaps.c index e062d3c..38da824 100644 --- a/ls-ecaps.c +++ b/ls-ecaps.c @@ -20,8 +20,8 @@ cap_dsn(struct device *d, int where) t1 = get_conf_long(d, where + 4); t2 = get_conf_long(d, where + 8); printf("Device Serial Number %02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x\n", - t1 & 0xff, (t1 >> 8) & 0xff, (t1 >> 16) & 0xff, t1 >> 24, - t2 & 0xff, (t2 >> 8) & 0xff, (t2 >> 16) & 0xff, t2 >> 24); + t2 >> 24, (t2 >> 16) & 0xff, (t2 >> 8) & 0xff, t2 & 0xff, + t1 >> 24, (t1 >> 16) & 0xff, (t1 >> 8) & 0xff, t1 & 0xff); } static void -- 2.39.2