diff --git a/jtag/src/cmd/shell.c b/jtag/src/cmd/shell.c index a1ba2bd7..ee1db899 100644 --- a/jtag/src/cmd/shell.c +++ b/jtag/src/cmd/shell.c @@ -24,7 +24,11 @@ #include "sysdep.h" -//#include +#include +#include +#include + +#include #include #include //#include "part.h" @@ -36,8 +40,8 @@ static int cmd_shell_run( char *params[] ) { -int n,l1,l2; -char *t; + int i, len, n = cmd_params(params); + char *shell_cmd; if((n=cmd_params( params )) == 1) return -1; @@ -46,17 +50,30 @@ char *t; * the following. If you can pass a shell argument past strtok the * please fix this. */ + /* The problem is the parser which splits commands into params[] + * and doesn't allow quoting. So we concatenate the params[] here + * with single spaces, although the original might have different + * whitespace (more than one space, tabs, ...) - kawk */ + + for(i=1,len=0; i