24 Jul, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini
04 Feb, 2013
1 commit
-
As far as every arch has a get_timer function,
run_command_and_time_it code can now disappear.Signed-off-by: Richard Genoud
Acked-By: Che-Liang Chiou
[trini: s/ulong/unsigned long/ in command.h portion]
Signed-off-by: Tom Rini
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 statnote: hush.c's nesting_level deleted because not used.
Signed-off-by: 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:3007With 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 deviceSigned-off-by: 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
21 Jun, 2012
1 commit
-
Exactly one board has defined CONFIG_SYS_PROMPT_HUSH_PS2 to a value
different than "> " which is vision2. I have Cc'd the maintainer here
as I strongly suspect this is a bug rather than intentional behavior.Cc: Stefano Babic
Signed-off-by: Tom Rini
Acked-by: Stefano Babic
07 Mar, 2012
3 commits
-
We currently have the same code in hush.c and main.c. This brings the
code into one place.As an added feature, if the command function returns CMD_RET_USAGE then
cmd_process() will print a usage message for the command before
returning the standard failure code of 1.ARM code size increases about 32 bytes with this clean-up.
Signed-off-by: Simon Glass
-
There is a nasty interleave of #ifdefs in hush.c where the two code
paths have different indents. Remove this ickiness.Signed-off-by: Simon Glass
-
We should aim for a single point of entry to the commands, whichever
parser is used.Signed-off-by: Simon Glass
22 Nov, 2011
1 commit
-
Extract all extern declarations for console_buffer[] out of c files into
the common.h header.Signed-off-by: Igor Grinberg
Cc: Frank Gottschling
Cc: Murray Jensen
27 Oct, 2011
1 commit
-
This function is generally useful and shouldn't hide away in hush. It
has been moved as is.Signed-off-by: Simon Glass
18 Oct, 2011
1 commit
-
Signed-off-by: Jason Hobbs
Cc: Mike Frysinger
Acked-by: Mike Frysinger
11 May, 2011
1 commit
-
Signed-off-by: Holger Brunck
Acked-by: Heiko Schocher
cc: Wolfgang Denk
cc: Detlev Zundel
cc: Valentin Longchamp
Signed-off-by: Valentin Longchamp
29 Nov, 2010
2 commits
-
The duplication of the do_reset prototype has gotten out of hand,
and they're not all in sync. Unify them all in command.h.Signed-off-by: Mike Frysinger
-
Signed-off-by: Mike Frysinger
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
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 byreturn cmd_usage(cmdtp);
This fixes a few places with incorrect return code handling, too.
Signed-off-by: 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
30 Jun, 2010
1 commit
-
The console_buffer size is declared in common/main.c as
-- char console_buffer[CONFIG_SYS_CBSIZE + 1];
so this extern definition is wrong.Signed-off-by: Remy Bohmer
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
10 Aug, 2009
1 commit
-
An off-by-one error in hush.c resulted in an unintentional free() call
every time a command was executedSigned-off-by: Peter Tyser
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 ThermostatUsage:
dtt - Read temperature from digital thermometer and thermostat.After:
=> help dtt
dtt - Read temperature from Digital Thermometer and ThermostatUsage:
dttSigned-off-by: Wolfgang Denk
12 Feb, 2009
1 commit
-
Move global '#ifdef CONFIG_xxx .... #endif' out of the .c files and into
the COBJS-$(CONFIG_xxx) in the Makefile. Also delete unused var in kgdb
code in the process.Signed-off-by: Mike Frysinger
28 Jan, 2009
2 commits
-
Remove command name from all command "usage" fields and update
common/command.c to display "name - usage" instead of
just "usage". Also remove newlines from command usage fields.Signed-off-by: Peter Tyser
-
Signed-off-by: Peter Tyser
19 Oct, 2008
2 commits
-
Signed-off-by: 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
21 Aug, 2008
1 commit
-
This patch changes the debug_printf() marco for U-Boot in hush.c and
moves the definition of DEBUG_SHELL to a place that is actually compiled
under U-Boot.Signed-off-by: Stefan Roese
14 Jul, 2008
1 commit
-
Signed-off-by: Wolfgang Denk
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
11 Jul, 2007
1 commit
-
Fixed some broken instances of "#ifdef CMD_CFG_IDE" too.
Those always evaluated TRUE, and thus were always compiled
even when IDE really wasn't defined/wanted.Signed-off-by: Jon Loeliger
09 Jul, 2007
1 commit
-
Signed-off-by: Jon Loeliger
04 Jul, 2007
1 commit
-
This is a compatibility step that allows both the older form
and the new form to co-exist for a while until the older can
be removed entirely.All transformations are of the form:
Before:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT)
After:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)Signed-off-by: Jon Loeliger
01 Apr, 2006
1 commit
13 Oct, 2005
1 commit
28 Sep, 2005
1 commit
-
Patch by Lars Rostock, 26 Sep 2005
13 Aug, 2005
1 commit
-
Caveat: this currently *requires* CONFIG_RESET_TO_RETRY to be set, too.
Patch by Andreas Engel, 19 Jul 2005
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)
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, ==,
!=, <>, , =)