[PATCH 1/3] bootwrapper: In cuImage, print message for ENET devices not found in tree

Grant Likely grant.likely at secretlab.ca
Fri Aug 31 06:26:18 EST 2007


From: Grant Likely <grant.likely at secretlab.ca>

Signed-off-by: Grant Likely <grant.likely at secretlab.ca>
CC: Scott Wood <scottwood at freescale.com>
CC: Kumar Gala <galak at kernel.crashing.org>
CC: David Gibson <david at gibson.dropbear.id.au>
---

 arch/powerpc/boot/devtree.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/boot/devtree.c b/arch/powerpc/boot/devtree.c
index e1b8122..8451a1c 100644
--- a/arch/powerpc/boot/devtree.c
+++ b/arch/powerpc/boot/devtree.c
@@ -99,14 +99,14 @@ void __dt_fixup_mac_addresses(u32 startindex, ...)
 	while ((addr = va_arg(ap, const u8 *))) {
 		devp = find_node_by_prop_value(NULL, "linux,network-index",
 					       (void*)&index, sizeof(index));
-
-		printf("ENET%d: local-mac-address <-"
-		       " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
-		       addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
-
-		if (devp)
+		if (devp) {
+			printf("ENET%d: local-mac-address <-"
+			       " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
+			       addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
 			setprop(devp, "local-mac-address", addr, 6);
-
+		} else {
+			printf("ENET%d: no device in tree\n\r", index);
+		}
 		index++;
 	}
 	va_end(ap);




More information about the Linuxppc-dev mailing list