cmd_usage(): simplify return code handlingLots of code use this construct: cmd_usage(cmdtp); return 1;Change cmd_usage() let it return 1 - then we can replace all theseocurrances by return
cmd_usage(): simplify return code handlingLots of code use this construct: cmd_usage(cmdtp); return 1;Change cmd_usage() let it return 1 - then we can replace all theseocurrances by return cmd_usage(cmdtp);This fixes a few places with incorrect return code handling, too.Signed-off-by: Wolfgang Denk <wd@denx.de>
show more ...
Make sure that argv[] argument pointers are not modified.The hush shell dynamically allocates (and re-allocates) memory for theargument strings in the "char *argv[]" argument vector passed tocomm
Make sure that argv[] argument pointers are not modified.The hush shell dynamically allocates (and re-allocates) memory for theargument strings in the "char *argv[]" argument vector passed tocommands. Any code that modifies these pointers will cause seriouscorruption of the malloc data structures and crash U-Boot, so makesure the compiler can check that no such modifications are being doneby changing the code into "char * const argv[]".This modification is the result of debugging a strange crash causedafter adding a new command, which used the following argumentprocessing code which has been working perfectly fine in all Unixsystems since version 6 - but not so in U-Boot:int main (int argc, char **argv){ while (--argc > 0 && **++argv == '-') {/* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ...}The line marked "====>" will corrupt the malloc data structures andusually cause U-Boot to crash when the next command gets executed bythe shell. With the modification, the compiler will prevent this withan error: increment of read-only location '*argv'N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ...Signed-off-by: Wolfgang Denk <wd@denx.de>Acked-by: Mike Frysinger <vapier@gentoo.org>
serial: punt unused serial_addr()Only one file apparently defines this function, and it merely stubsit out. So if no one is defining/calling it, punt it.Signed-off-by: Mike Frysinger <vapier@gen
serial: punt unused serial_addr()Only one file apparently defines this function, and it merely stubsit out. So if no one is defining/calling it, punt it.Signed-off-by: Mike Frysinger <vapier@gentoo.org>
General help message cleanupMany of the help messages were not really helpful; for example, manycommands that take no arguments would not print a correct synopsisline, but "No additional help ava
General help message cleanupMany of the help messages were not really helpful; for example, manycommands that take no arguments would not print a correct synopsisline, but "No additional help available." which is not exactly wrong,but not helpful either.Commit ``Make "usage" messages more helpful.'' changed thispartially. But it also became clear that lots of "Usage" and "Help"messages (fields "usage" and "help" in struct cmd_tbl_s respective)were actually redundant.This patch cleans this up - for example:Before: => help dtt dtt - Digital Thermometer and Thermostat Usage: dtt - Read temperature from digital thermometer and thermostat.After: => help dtt dtt - Read temperature from Digital Thermometer and Thermostat Usage: dttSigned-off-by: Wolfgang Denk <wd@denx.de>
Command usage cleanupRemove command name from all command "usage" fields and updatecommon/command.c to display "name - usage" instead ofjust "usage". Also remove newlines from command usage field
Command usage cleanupRemove command name from all command "usage" fields and updatecommon/command.c to display "name - usage" instead ofjust "usage". Also remove newlines from command usage fields.Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Standardize command usage messages with cmd_usage()Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
rename CFG_ macros to CONFIG_SYSSigned-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
rename CFG_ENV macros to CONFIG_ENVSigned-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
rename CFG_ENV_IS_IN_FLASH in CONFIG_ENV_IS_IN_FLASHSigned-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
cleanup use of CFG_ENV_IS_IN_FLASH- #if CFG_ENV_IS_IN_FLASH- #if (CFG_ENV_IS_IN_FLASH == 1)- #define CFG_ENV_IS_IN_FLASH 0Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Fix some more print() format errors.Signed-off-by: Wolfgang Denk <wd@denx.de>
Change initdram() return type to phys_size_tThis patch changes the return type of initdram() from long int to phys_size_t.This is required for a couple of reasons: long int limits the amount of dr
Change initdram() return type to phys_size_tThis patch changes the return type of initdram() from long int to phys_size_t.This is required for a couple of reasons: long int limits the amount of dramto 2GB, and u-boot in general is moving over to phys_size_t to represent thesize of physical memory. phys_size_t is defined as an unsigned long on almostall current platforms.This patch *only* changes the return type of the initdram function (ininclude/common.h, as well as in each board's implementation of initdram). Itdoes not actually modify the code inside the function on any of the platforms;platforms which wish to support more than 2GB of DRAM will need to modifytheir initdram() function code.Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpcMPC8641HPCN.Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Big white-space cleanup.This commit gets rid of a huge amount of silly white-space issues.Especially, all sequences of SPACEs followed by TAB characters getremoved (unless they appear in print st
Big white-space cleanup.This commit gets rid of a huge amount of silly white-space issues.Especially, all sequences of SPACEs followed by TAB characters getremoved (unless they appear in print statements).Also remove all embedded "vim:" and "vi:" statements which hideindentation problems.Signed-off-by: Wolfgang Denk <wd@denx.de>
Remove obsolete mpc824x linker scripts (1 of 4)Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Move "ar" flags to config.mk to allow for silent "make -s"Based on patch by Mike Frysinger, 20 Jun 2006
Add support for a saving build objects in a separate directory.Modifications are based on the linux kernel approach andsupport two use cases: 1) Add O= to the make command line 'make O=/tmp/bu
Add support for a saving build objects in a separate directory.Modifications are based on the linux kernel approach andsupport two use cases: 1) Add O= to the make command line 'make O=/tmp/build all' 2) Set environement variable BUILD_DIR to point to the desired location 'export BUILD_DIR=/tmp/build' 'make'The second approach can also be used with a MAKEALL script'export BUILD_DIR=/tmp/build''./MAKEALL'Command line 'O=' setting overrides BUILD_DIR environent variable.When none of the above methods is used the local build is performed andthe object files are placed in the source directory.
Cleanup for GCC-4.x
Support passing of OF flat trees to the kernel.Patch by Pantelis Antoniou, 04 Sep 2005
Add Barco Streaming Video Card (SVC) and Sample Compress Network (SCN) boardPatch by Marc Leeman, 04 Mar 2005
12