Skip to contentSkip to conversation

PATCH: Declare load_serial_ymodem() for both CFG_CMD_LOAD{S,B}

U-Boot-Users Jon Loeliger 2 participants 4 messages May 1, 2006

lore
Share & tools
lore
#0 lore raw

Declare load_serial_ymodem() for both CFG_CMD_LOAD{S,B} as it appears to be needed by both the loadb and loads commands now.

---

load_serial_ymodem() seems oddly mis-named now. :-)

common/cmd_load.c +4 -1
index 2432ee2..df5a022 100644
@@ -33,9 +33,12 @@ #include <xyzModem.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#if (CONFIG_COMMANDS & CFG_CMD_LOADB) | (CONFIG_COMMANDS & CFG_CMD_LOADS)
+static ulong load_serial_ymodem (ulong offset);
+#endif
+
 #if (CONFIG_COMMANDS & CFG_CMD_LOADS)
 static ulong load_serial (ulong offset);
-static ulong load_serial_ymodem (ulong offset);
 static int read_record (char *buf, ulong len);
 # if (CONFIG_COMMANDS & CFG_CMD_SAVES)
 static int save_serial (ulong offset, ulong size);
#1 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

Declare load_serial_ymodem() for both CFG_CMD_LOAD{S,B} as it appears to be needed by both the loadb and loads commands now.

The only reference (call) to the load_serial_ymodem() function is in
do_load_serial_bin() which in turn is only compiled if
'CONFIG_COMMANDS & CFG_CMD_LOADB' is true.

What makes you think it might be needed with CFG_CMD_LOADS ?

Quoted 1 line

BTW: Changelog entry missing!

Quoted 1 line

load_serial_ymodem() seems oddly mis-named now. :-)

Please elucidate...

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.
#2 lore raw
Quoted 10 lines · Wolfgang Denk
Quoted 3 lines · In message <[email protected]> you wrote:

Declare load_serial_ymodem() for both CFG_CMD_LOAD{S,B} as it appears to be needed by both the loadb and loads commands now.

The only reference (call) to the load_serial_ymodem() function is in
do_load_serial_bin() which in turn is only compiled if
'CONFIG_COMMANDS & CFG_CMD_LOADB' is true.

What makes you think it might be needed with CFG_CMD_LOADS ?

Hmmmm... Interesting point. It used to look like this:

#if (CONFIG_COMMANDS & CFG_CMD_LOADS)
static ulong load_serial (ulong offset);
static ulong load_serial_ymodem (ulong offset);
static int read_record (char *buf, ulong len);

Drop my previous patch. New patch follows.

jdl

#3 lore raw
Quoted 7 lines · In message <[email protected]> you wrote:

Hmmmm... Interesting point. It used to look like this:

#if (CONFIG_COMMANDS & CFG_CMD_LOADS)
static ulong load_serial (ulong offset);
static ulong load_serial_ymodem (ulong offset);
static int read_record (char *buf, ulong len);

I see. Indeed. that will cause problems when CFG_CMD_LOADS is set but CFG_CMD_LOADB isn't (but anybody doing that should fix his configu- ration anyway :-)

Quoted 1 line

Drop my previous patch. New patch follows.

Dropped.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Program maintenance is an entropy-increasing process,  and  even  its
most skilfull execution only delays the subsidence of the system into
unfixable obsolescence.       - Fred Brooks, "The Mythical Man Month"