From: Gene Cumm Date: Sat, 2 Oct 2010 04:55:02 +0000 (-0400) Subject: rosh: Fix warning on rosh_ls_arg(); remove rosh_echo() for rosh_pr_argv() X-Git-Tag: syslinux-4.04-pre1~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=736c1716e9382c6d2d20bcc8b326302e89952ee4;p=profile%2Fivi%2Fsyslinux.git rosh: Fix warning on rosh_ls_arg(); remove rosh_echo() for rosh_pr_argv() --- diff --git a/com32/rosh/rosh.c b/com32/rosh/rosh.c index 0cc0345..96f21a5 100644 --- a/com32/rosh/rosh.c +++ b/com32/rosh/rosh.c @@ -202,6 +202,15 @@ void rosh_free_argv(char ***argv) free_args1(argv); } +void rosh_pr_argv(int argc, char *argv[]) +{ + int i; + for (i = 0; i < argc; i++) { + printf("%s%s", argv[i], (i < argc)? " " : ""); + } + puts(""); +} + void rosh_pr_argv_v(int argc, char *argv[]) { int i; @@ -778,7 +787,7 @@ void rosh_ls_arg(const char *filestr, const int *optarr) if (status == 0) { if (S_ISDIR(fdstat.st_mode)) { ROSH_DEBUG("PATH '%s' is a directory\n", filestr); - if (d = opendir(filestr)) { + if ((d = opendir(filestr))) { rosh_ls_arg_dir(filestr, d, optarr); closedir(d); } else { @@ -1141,7 +1150,7 @@ char rosh_command(int argc, char *argv[], const char *ipwdstr) case 'c': case 'C': if (strncasecmp("echo", argv[0], tlen) == 0) - rosh_echo(cmdstr); + rosh_pr_argv(argc - 1, &argv[1]); else rosh_help(1, NULL); break;