Fix crash on sequoia in ppc_4xx_eth_init
[oweals/u-boot.git] / common / cmd_load.c
index d3d268158e8aec7d48312dd05fb9bb9d02e2cbce..1b75a7b5eccf15289e03d9f341efd5c193ba444e 100644 (file)
@@ -43,10 +43,10 @@ static int read_record (char *buf, ulong len);
 # if defined(CONFIG_CMD_SAVES)
 static int save_serial (ulong offset, ulong size);
 static int write_record (char *buf);
-# endif /* CFG_CMD_SAVES */
+#endif
 
 static int do_echo = 1;
-#endif /* CFG_CMD_LOADS */
+#endif
 
 /* -------------------------------------------------------------------- */
 
@@ -399,9 +399,9 @@ write_record (char *buf)
        }
        return (0);
 }
-# endif /* CFG_CMD_SAVES */
+# endif
 
-#endif /* CFG_CMD_LOADS */
+#endif
 
 
 #if defined(CONFIG_CMD_LOADB)
@@ -521,8 +521,15 @@ int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                char *s;
 
                if (((s = getenv("autoscript")) != NULL) && (strcmp(s,"yes") == 0)) {
-                       printf("Running autoscript at addr 0x%08lX ...\n", load_addr);
-                       rcode = autoscript (load_addr);
+                       printf ("Running autoscript at addr 0x%08lX", load_addr);
+
+                       s = getenv ("autoscript_uname");
+                       if (s)
+                               printf (":%s ...\n", s);
+                       else
+                               puts (" ...\n");
+
+                       rcode = autoscript (load_addr, s);
                }
        }
 #endif
@@ -1038,7 +1045,7 @@ static ulong load_serial_ymodem (ulong offset)
        return offset;
 }
 
-#endif /* CFG_CMD_LOADB */
+#endif
 
 /* -------------------------------------------------------------------- */
 
@@ -1084,8 +1091,8 @@ U_BOOT_CMD(
        "    - save S-Record file over serial line with offset 'off' and size 'size'\n"
 );
 #endif /* CFG_LOADS_BAUD_CHANGE */
-#endif /* CFG_CMD_SAVES */
-#endif /* CFG_CMD_LOADS */
+#endif
+#endif
 
 
 #if defined(CONFIG_CMD_LOADB)
@@ -1105,7 +1112,7 @@ U_BOOT_CMD(
        " with offset 'off' and baudrate 'baud'\n"
 );
 
-#endif /* CFG_CMD_LOADB */
+#endif
 
 /* -------------------------------------------------------------------- */
 
@@ -1135,4 +1142,4 @@ U_BOOT_CMD(
        "[on|off]\n - change RTS/CTS hardware flow control over serial line\n"
 );
 
-#endif /* CFG_CMD_HWFLOW */
+#endif