[PATCH 02/11] Display GUID in platform dump_config

Daniel M. Weeks weeksd2 at rpi.edu
Fri Apr 17 03:58:49 AEST 2020


Signed-off-by: Daniel M. Weeks <weeksd2 at rpi.edu>
---
 discover/platform.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

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");
-- 
Daniel M. Weeks


-- 
Daniel M. Weeks
Lead HPC Developer
Center for Computational Innovations
Rensselaer Polytechnic Institute
Troy, NY 12180
518-276-4458


More information about the Petitboot mailing list