24 Jul, 2013

1 commit


04 Feb, 2013

1 commit


05 Nov, 2012

1 commit

  • command.c:44:38: error: bad constant expression
    dlmalloc.c:1468:2: warning: Using plain integer as NULL pointer
    dlmalloc.c:1468:5: warning: Using plain integer as NULL pointer
    dlmalloc.c:2176:12: warning: Using plain integer as NULL pointer
    dlmalloc.c:2179:31: warning: Using plain integer as NULL pointer
    dlmalloc.c:2382:14: warning: Using plain integer as NULL pointer
    dlmalloc.c:2436:14: warning: Using plain integer as NULL pointer
    dlmalloc.c:2582:31: warning: Using plain integer as NULL pointer
    dlmalloc.c:2585:17: warning: Using plain integer as NULL pointer
    dlmalloc.c:2646:14: warning: Using plain integer as NULL pointer
    dlmalloc.c:2659:19: warning: Using plain integer as NULL pointer
    dlmalloc.c:2692:19: warning: Using plain integer as NULL pointer
    dlmalloc.c:2707:19: warning: Using plain integer as NULL pointer
    dlmalloc.c:2708:14: warning: Using plain integer as NULL pointer
    dlmalloc.c:2786:31: warning: Using plain integer as NULL pointer
    dlmalloc.c:2801:12: warning: Using plain integer as NULL pointer
    dlmalloc.c:2801:22: warning: Using plain integer as NULL pointer
    dlmalloc.c:2926:27: warning: Using plain integer as NULL pointer
    dlmalloc.c:2928:14: warning: Using plain integer as NULL pointer
    dlmalloc.c:2929:12: warning: Using plain integer as NULL pointer
    dlmalloc.c:3075:14: warning: Using plain integer as NULL pointer
    hush.c:292:14: warning: symbol 'last_return_code' was not declared. Should it be static?
    hush.c:293:5: warning: symbol 'nesting_level' was not declared. Should it be static?
    hush.c:2175:20: warning: Using plain integer as NULL pointer
    hush.c:2175:34: warning: Using plain integer as NULL pointer
    hush.c:2210:41: warning: Using plain integer as NULL pointer
    hush.c:2216:45: warning: Using plain integer as NULL pointer
    hush.c:2249:25: warning: Using plain integer as NULL pointer
    hush.c:2332:13: warning: symbol 'new_pipe' was not declared. Should it be static?
    hush.c:2390:5: warning: symbol 'reserved_word' was not declared. Should it be static?
    hush.c:2927:5: warning: symbol 'parse_stream' was not declared. Should it be static?
    hush.c:3127:6: warning: symbol 'mapset' was not declared. Should it be static?
    hush.c:3133:6: warning: symbol 'update_ifs_map' was not declared. Should it be static?
    hush.c:3161:5: warning: symbol 'parse_stream_outer' was not declared. Should it be static?
    hush.c:3295:34: warning: Using plain integer as NULL pointer
    hush.c:3631:5: warning: symbol 'do_showvar' was not declared. Should it be static
    image.c:1282:29: warning: Using plain integer as NULL pointer
    image.c:1315:41: warning: Using plain integer as NULL pointer
    image.c:1330:25: warning: Using plain integer as NULL pointer
    image.c:1706:25: warning: Using plain integer as NULL pointer
    main.c:510:10: warning: symbol 'hist_num' was not declared. Should it be static?
    main.c:512:5: warning: symbol 'hist_list' was not declared. Should it be static?
    main.c:513:6: warning: symbol 'hist_lines' was not declared. Should it be static?
    usb_storage.c:195:6: warning: symbol 'usb_show_progress' was not declared. Should it be static?
    usb_storage.c:440:48: warning: Using plain integer as NULL pointer
    usb_storage.c:503:5: warning: symbol 'usb_stor_BBB_comdat' was not declared. Should it be static?
    usb_storage.c:551:5: warning: symbol 'usb_stor_CB_comdat' was not declared. Should it be static?
    usb_storage.c:629:55: warning: Using plain integer as NULL pointer
    usb_storage.c:620:5: warning: symbol 'usb_stor_CBI_get_status' was not declared. Should it be static?
    usb_storage.c:675:43: warning: Using plain integer as NULL pointer
    usb_storage.c:668:5: warning: symbol 'usb_stor_BBB_clear_endpt_stall' was not declared. Should it be static?
    usb_storage.c:679:5: warning: symbol 'usb_stor_BBB_transport' was not declared. Should it be static?
    usb_storage.c:801:5: warning: symbol 'usb_stor_CB_transport' was not declared. Sh
    xyzModem.c:104:1: warning: symbol 'CYGACC_COMM_IF_GETC_TIMEOUT' was not declared. Should it be static?
    xyzModem.c:122:1: warning: symbol 'CYGACC_COMM_IF_PUTC' was not declared. Should it be static?
    xyzModem.c:169:1: warning: symbol 'parse_num' was not declared. Should it be stat

    note: hush.c's nesting_level deleted because not used.

    Signed-off-by: Kim Phillips

    Kim Phillips
     

03 Sep, 2012

2 commits

  • When a variable which contains a user-supplied value is dereferenced
    (e.g. to be echo'ed), make sure that the value is not further parsed
    by hush.

    Set the hush local variable "HUSH_NO_EVAL=1" to enable this behavior.

    Without this patch, a sequence like this occurs:

    Panda # env set my_user_string Bob\'s favorite device
    Panda # print my_user_string
    my_user_string=Bob's favorite device
    Panda # echo $my_user_string
    syntax error hush.c:3007

    With this patch, it looks like this:

    Panda # HUSH_NO_EVAL=1
    Panda # env set my_user_string Bob\'s favorite device
    Panda # print my_user_string
    my_user_string=Bob's favorite device
    Panda # echo $my_user_string
    Bob's favorite device

    Signed-off-by: Joe Hershberger

    Joe Hershberger
     
  • Use standard sh syntax:
    ${VAR:-default}
    Use default value: if VAR is set and non-null, expands to $VAR.
    Otherwise, expands to default.
    ${VAR:=default}
    Set default value: if VAR is set and non-null, expands to $VAR.
    Otherwise, sets hush VAR to default and expands to default.
    ${VAR:+default}
    If VAR is set and non-null, expands to the empty string.
    Otherwise, expands to default.

    Signed-off-by: Joe Hershberger

    Joe Hershberger
     

21 Jun, 2012

1 commit


07 Mar, 2012

3 commits


22 Nov, 2011

1 commit


27 Oct, 2011

1 commit


18 Oct, 2011

1 commit


11 May, 2011

1 commit


29 Nov, 2010

2 commits


30 Oct, 2010

1 commit

  • By now, the majority of architectures have working relocation
    support, so the few remaining architectures have become exceptions.
    To make this more obvious, we make working relocation now the default
    case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC.

    Signed-off-by: Wolfgang Denk
    Tested-by: Heiko Schocher
    Tested-by: Reinhard Meyer

    Wolfgang Denk
     

25 Jul, 2010

1 commit

  • Lots of code use this construct:

    cmd_usage(cmdtp);
    return 1;

    Change cmd_usage() let it return 1 - then we can replace all these
    ocurrances by

    return cmd_usage(cmdtp);

    This fixes a few places with incorrect return code handling, too.

    Signed-off-by: Wolfgang Denk

    Wolfgang Denk
     

05 Jul, 2010

1 commit

  • 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: Wolfgang Denk
    Acked-by: Mike Frysinger

    Wolfgang Denk
     

30 Jun, 2010

1 commit


03 Oct, 2009

1 commit

  • Add #ifdefs where necessary to not perform relocation fixups. This
    allows boards/architectures which support relocation to trim a decent
    chunk of code.

    Note that this patch doesn't add #ifdefs to architecture-specific code
    which does not support relocation.

    Signed-off-by: Peter Tyser

    Peter Tyser
     

10 Aug, 2009

1 commit


13 Jun, 2009

1 commit

  • 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: Wolfgang Denk

    Wolfgang Denk
     

12 Feb, 2009

1 commit


28 Jan, 2009

2 commits


19 Oct, 2008

2 commits

  • Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD

    Jean-Christophe PLAGNIOL-VILLARD
     
  • This new command shows the local variables defined in
    the hush shell:

    => help showvar
    showvar
    - print values of all hushshell variables
    showvar name ...
    - print value of hushshell variable 'name'

    Also make the set_local_var() and unset_local_var ()
    no longer static, so it is possible to define local
    hush shell variables at boot time. If CONFIG_HUSH_INIT_VAR
    is defined, u-boot calls hush_init_var (), where
    boardspecific code can define local hush shell
    variables at boottime.

    Signed-off-by: Heiko Schocher

    Heiko Schocher
     

21 Aug, 2008

1 commit


14 Jul, 2008

1 commit


21 May, 2008

1 commit

  • This commit gets rid of a huge amount of silly white-space issues.
    Especially, all sequences of SPACEs followed by TAB characters get
    removed (unless they appear in print statements).

    Also remove all embedded "vim:" and "vi:" statements which hide
    indentation problems.

    Signed-off-by: Wolfgang Denk

    Wolfgang Denk
     

11 Jul, 2007

1 commit


09 Jul, 2007

1 commit


04 Jul, 2007

1 commit


01 Apr, 2006

1 commit


13 Oct, 2005

1 commit


28 Sep, 2005

1 commit


13 Aug, 2005

1 commit


18 Apr, 2004

1 commit

  • - add support for a new version of an Intracom board and fix
    various other things on others.
    - add verify support to the crc32 command (define
    CONFIG_CRC32_VERIFY to enable it)
    - fix FEC driver for MPC8xx systems:
    1. fix compilation problems for boards that use dynamic
    allocation of DPRAM
    2. shut down FEC after network transfers
    - HUSH parser fixes:
    1. A new test command was added. This is a simplified version of
    the one in the bourne shell.
    2. A new exit command was added which terminates the current
    executing script.
    3. Fixed handing of $? (exit code of last executed command)

    wdenk
     

12 Apr, 2004

1 commit


24 Feb, 2004

1 commit

  • 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, ==,
    !=, <>, , =)

    wdenk