1. 06 Mar, 2012 1 commit
  2. 15 Feb, 2011 1 commit
  3. 28 Nov, 2010 1 commit
  4. 24 Jul, 2010 1 commit
  5. 04 Jul, 2010 1 commit
    • Wolfgang Denk's avatar
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk authored
      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: default avatarWolfgang Denk <wd@denx.de>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      54841ab5
  6. 23 Feb, 2010 1 commit
  7. 12 Jun, 2009 1 commit
    • Wolfgang Denk's avatar
      General help message cleanup · a89c33db
      Wolfgang Denk authored
      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: default avatarWolfgang Denk <wd@denx.de>
      a89c33db
  8. 28 Jan, 2009 2 commits
  9. 10 Sep, 2008 1 commit
  10. 21 Nov, 2007 1 commit
  11. 08 Jul, 2007 1 commit
  12. 03 Jul, 2007 1 commit
  13. 09 Jun, 2004 1 commit
    • wdenk's avatar
      Patch by Thomas Viehweger, 14 May 2004: · aa5590b6
      wdenk authored
      - flash.h: more flash types added
      - immap_8260.h: some bits added (useful for RMII)
      - cmd_coninfo.c: typo corrected, printf -> puts
      - reduced size by replacing spaces with tab
      aa5590b6
  14. 24 Feb, 2004 1 commit
  15. 23 Feb, 2004 2 commits
    • wdenk's avatar
      * Patch by Laurent Mohin, 10 Feb 2004: · cd0a9de6
      wdenk authored
        Fix buffer overflow in common/usb.c
      
      * Patch by Tolunay Orkun, 10 Feb 2004:
        Add support for Cogent CSB272 board
      
      * Code cleanup
      cd0a9de6
    • wdenk's avatar
      * Patch by Thomas Elste, 10 Feb 2004: · 2d1a537d
      wdenk authored
        Add support for NET+50 CPU and ModNET50 board
      
      * Patch by Sam Song, 10 Feb 2004:
        Fix typos in cfi_flash.c
      
      * Patch by Leon Kukovec, 10 Feb 2004
        Fixed long dir entry slot id calculation in get_vfatname
      
      * Patch by Robin Gilks, 10 Feb 2004:
        add "itest" command (operators: -eq, -ne, -lt, -gt, -le, -ge, ==,
        !=, <>, <, >, <=, >=)
      2d1a537d