Skip to content
Snippets Groups Projects
  1. Aug 06, 2013
  2. Jun 02, 2013
  3. Apr 08, 2013
    • Mingkai Hu's avatar
      cmd_sf: include header file common.h before div64.h · 381c6e2c
      Mingkai Hu authored
      
      The header file div64.h includes <asm/types.h> which defines
      the phys_addr_t according to the macro CONFIG_PHYS_64BIT, while
      the macro CONFIG_PHYS_64BIT is included in common.h which comes
      after div64.h, so in order to get consistent type definition for
      phys_addr_t, common.h should be included before div64.h, Or else,
      the parameters of phys_addr_t type will be passed wrongly when
      CONFIG_PHYS_64BIT is defined.
      
      Signed-off-by: default avatarMingkai Hu <Mingkai.Hu@freescale.com>
      381c6e2c
  4. Mar 19, 2013
  5. Dec 19, 2012
  6. Apr 03, 2012
  7. Mar 06, 2012
  8. Feb 12, 2012
  9. Dec 17, 2011
    • Andreas Bießmann's avatar
      cmd_sf.c: fix printf() length modifier · a97f6efd
      Andreas Bießmann authored
      
      size_t is not always 'unsigned int', use corret length modifer.
      
      This patch fixes following warning:
      
      ---8<---
      cmd_sf.c: In function 'spi_flash_update_block':
      cmd_sf.c:130: warning: format '%#x' expects type 'unsigend int', but argument 4 has type 'size_t'
      cmd_sf.c:135: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'
      --->8---
      
      Signed-off-by: default avatarAndreas Bießmann <biessmann@corscience.de>
      cc: Mike Frysinger <vapier@gentoo.org>
      cc: Thomas Chou <thomas@wytron.com.tw>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      a97f6efd
  10. Oct 05, 2011
  11. Sep 29, 2011
  12. Sep 07, 2011
    • Anton Staaf's avatar
      common: fix behavior of ROUND macro when input is already rounded · 155cfb5e
      Anton Staaf authored
      Currently when you call ROUND with a value that is already a
      multiple of the second parameter it will return a value that is
      one multiple larger, instead of returning the value passed in.
      
      There are only two types of usage of ROUND currently, one in
      various config files to round CONFIG_SYS_MALLOC_LEN to a multiple
      of 4096 bytes.  The other in cmd_sf.c where the incorrect behavior
      of ROUND is worked around be subtracting one from the length argument
      before passing it to ROUND.
      
      This patch fixes ROUND and removes the workaround from cmd_sf.  It
      also results in all of the malloc pools that use ROUND to compute
      their size shrinking by 4KB.
      
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      155cfb5e
  13. Apr 12, 2011
  14. Jul 24, 2010
  15. Jul 04, 2010
    • 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
  16. Oct 24, 2009
  17. Jul 14, 2009
  18. Jun 12, 2009
    • 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
  19. Jan 28, 2009
  20. Jun 03, 2008
Loading