diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-03-16 14:05:55 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-03-16 14:05:55 +0000 |
commit | 0a973a9ea9c04c462666ca0d89e2cbba77fd2d84 (patch) | |
tree | d2ff82ce96f814d986812deda2db68657e747c36 | |
parent | New. (diff) | |
download | rtems-0a973a9ea9c04c462666ca0d89e2cbba77fd2d84.tar.bz2 |
2010-03-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/shell/shell_makeargs.c: Fix bugs introduced by patch
attempting to add quoted arguments.
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/libmisc/shell/shell_makeargs.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 46c4be3224..af85bd1053 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2010-03-16 Joel Sherrill <joel.sherrill@oarcorp.com> + + * libmisc/shell/shell_makeargs.c: Fix bugs introduced by patch + attempting to add quoted arguments. + 2010-03-12 Joel Sherrill <joel.sherrill@oarcorp.com> * libblock/src/ide_part_table.c: Functionality of diff --git a/cpukit/libmisc/shell/shell_makeargs.c b/cpukit/libmisc/shell/shell_makeargs.c index 248a8c6a89..727ea829c9 100644 --- a/cpukit/libmisc/shell/shell_makeargs.c +++ b/cpukit/libmisc/shell/shell_makeargs.c @@ -40,13 +40,15 @@ int rtems_shell_make_args( break; if ( *ch == '"' ) { - argv_p[ argc++ ] = ++ch; - while ( ( *ch == '\0' ) && ( *ch != '"' ) ) ch++; + argv_p[ argc ] = ++ch; + while ( ( *ch != '\0' ) && ( *ch != '"' ) ) ch++; } else { - argv_p[ argc++ ] = ch; - while ( ( *ch == '\0' ) && ( !isspace((unsigned char)*ch) ) ) ch++; + argv_p[ argc ] = ch; + while ( ( *ch != '\0' ) && ( !isspace((unsigned char)*ch) ) ) ch++; } + argc++; + if ( *ch == '\0' ) break; |