aboutsummaryrefslogtreecommitdiffstats
path: root/com32/rosh/rosh.c
diff options
context:
space:
mode:
authorGene Cumm <gene.cumm@gmail.com>2010-10-02 00:55:02 -0400
committerGene Cumm <gene.cumm@gmail.com>2010-10-09 07:33:07 -0400
commit736c1716e9382c6d2d20bcc8b326302e89952ee4 (patch)
treee18648ccfa4c632332702efef1fce896a9a17ae7 /com32/rosh/rosh.c
parentc7fdcb82d3cc6ac194f5294d86724fc6e8074059 (diff)
downloadsyslinux-736c1716e9382c6d2d20bcc8b326302e89952ee4.tar.gz
syslinux-736c1716e9382c6d2d20bcc8b326302e89952ee4.tar.xz
syslinux-736c1716e9382c6d2d20bcc8b326302e89952ee4.zip
rosh: Fix warning on rosh_ls_arg(); remove rosh_echo() for rosh_pr_argv()
Diffstat (limited to 'com32/rosh/rosh.c')
-rw-r--r--com32/rosh/rosh.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/com32/rosh/rosh.c b/com32/rosh/rosh.c
index 0cc03455..96f21a58 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;