[syslinux:master] rosh: Fix warning on rosh_ls_arg(); remove rosh_echo() for rosh_pr_argv()

syslinux-bot for Gene Cumm gene.cumm at gmail.com
Sun Nov 14 12:54:44 PST 2010


Commit-ID:  736c1716e9382c6d2d20bcc8b326302e89952ee4
Gitweb:     http://syslinux.zytor.com/commit/736c1716e9382c6d2d20bcc8b326302e89952ee4
Author:     Gene Cumm <gene.cumm at gmail.com>
AuthorDate: Sat, 2 Oct 2010 00:55:02 -0400
Committer:  Gene Cumm <gene.cumm at gmail.com>
CommitDate: Sat, 9 Oct 2010 07:33:07 -0400

rosh: Fix warning on rosh_ls_arg(); remove rosh_echo() for rosh_pr_argv()



---
 com32/rosh/rosh.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

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;



More information about the Syslinux-commits mailing list