1. 09 8月, 2010 1 次提交
  2. 05 7月, 2010 1 次提交
    • W
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk 提交于
      The hush shell dynamically allocates (and re-allocates) memory for the
      argument strings in the "char *argv[]" argument vector passed to
      commands.  Any code that modifies these pointers will cause serious
      corruption of the malloc data structures and crash U-Boot, so make
      sure the compiler can check that no such modifications are being done
      by changing the code into "char * const argv[]".
      
      This modification is the result of debugging a strange crash caused
      after adding a new command, which used the following argument
      processing code which has been working perfectly fine in all Unix
      systems 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 and
      usually cause U-Boot to crash when the next command gets executed by
      the shell.  With the modification, the compiler will prevent this with
      an
      	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: NWolfgang Denk <wd@denx.de>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      54841ab5
  3. 22 12月, 2009 1 次提交
  4. 03 12月, 2009 1 次提交
  5. 13 6月, 2009 1 次提交
    • W
      General help message cleanup · a89c33db
      Wolfgang Denk 提交于
      Many of the help messages were not really helpful; for example, many
      commands that take no arguments would not print a correct synopsis
      line, but "No additional help available." which is not exactly wrong,
      but not helpful either.
      
      Commit ``Make "usage" messages more helpful.'' changed this
      partially. 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:
      	dtt
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      a89c33db
  6. 28 1月, 2009 1 次提交
  7. 19 8月, 2008 1 次提交
    • H
      Add 'license' command to U-Boot command line · 0a823aa2
      Harald Welte 提交于
      The 'license' command includes the U-Boot license (GPLv2) into the
      actual bootloader binary. The license text can be shown interactively
      at the U-Boot commandline.
      
      For products where the commandline can actually be accessed by the
      end user, this helps to prevent inadvertent GPL violations, since the
      GPLv2 license text can no longer be 'forgotten' to be included into
      the product.
      
      The 'license' command can be enabled by CONFIG_CMD_LICENSE.
      Signed-off-by: NHarald Welte <laforge@openmoko.org>
      0a823aa2
  8. 28 3月, 2008 1 次提交
  9. 27 12月, 2007 1 次提交
  10. 23 9月, 2007 1 次提交
  11. 13 5月, 2007 1 次提交
  12. 02 7月, 2003 1 次提交
  13. 30 6月, 2003 1 次提交
  14. 16 6月, 2003 1 次提交
    • W
      * Fix CONFIG_NET_MULTI support in include/net.h · 71f95118
      wdenk 提交于
      * Patches by Kyle Harris, 13 Mar 2003:
        - Add FAT partition support
        - Add command support for FAT
        - Add command support for MMC
        ----
        - Add Intel PXA support for video
        - Add Intel PXA support for MMC
        ----
        - Enable MMC and FAT for lubbock board
        - Other misc changes for lubbock board
      71f95118
  15. 27 3月, 2003 1 次提交
  16. 14 12月, 2000 1 次提交
  17. 13 11月, 2000 1 次提交