diff mbox series

[02/11] Display GUID in platform dump_config

Message ID 4972f3a28ce5d0f1fa87ed21d8e1fc479a5c5fca.1587059234.git.weeksd2@rpi.edu
State New
Headers show
Series IB netboot 2/3: longer hwaddr/guid support | expand

Commit Message

Daniel M. Weeks April 16, 2020, 5:58 p.m. UTC
Signed-off-by: Daniel M. Weeks <weeksd2@rpi.edu>
---
 discover/platform.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/discover/platform.c b/discover/platform.c
index cc6306f..cd35c45 100644
--- a/discover/platform.c
+++ b/discover/platform.c
@@ -43,10 +43,18 @@  static void dump_config(struct config *config)
 		struct interface_config *ifconf =
 			config->network.interfaces[i];
 
-		pb_log("  interface %02x:%02x:%02x:%02x:%02x:%02x\n",
+		if (ifconf->hwaddr_len == 6) {
+			pb_log("  interface %02x:%02x:%02x:%02x:%02x:%02x\n",
 				ifconf->hwaddr[0], ifconf->hwaddr[1],
 				ifconf->hwaddr[2], ifconf->hwaddr[3],
 				ifconf->hwaddr[4], ifconf->hwaddr[5]);
+		} else if (ifconf->hwaddr_len == 8) {
+			pb_log("  interface %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
+				ifconf->hwaddr[0], ifconf->hwaddr[1],
+				ifconf->hwaddr[2], ifconf->hwaddr[3],
+				ifconf->hwaddr[4], ifconf->hwaddr[5],
+				ifconf->hwaddr[6], ifconf->hwaddr[7]);
+		}
 
 		if (ifconf->ignore) {
 			pb_log("   ignore\n");