rosh: fix errors in previous commit
authorGene Cumm <gene.cumm@gmail.com>
Fri, 1 Oct 2010 03:08:24 +0000 (23:08 -0400)
committerGene Cumm <gene.cumm@gmail.com>
Sat, 9 Oct 2010 11:33:07 +0000 (07:33 -0400)
com32/rosh/rosh.c
com32/rosh/rosh.h

index 0d51f22..aac6044 100644 (file)
@@ -426,7 +426,10 @@ void rosh_cd(int argc, char *argv[], const char *ipwdstr)
     else
        rosh_help(2, argv[0]);
     if (rv != 0) {
-       rosh_error(errno, "cd", filestr);
+       if (argc == 2)
+           rosh_error(errno, "cd", argv[1]);
+       else
+           rosh_error(errno, "cd", ipwdstr);
        errno = 0;
     } else {
 #ifdef DO_DEBUG
index 907df1e..6e312ed 100644 (file)
@@ -56,7 +56,7 @@
 # endif        /* DO_DEBUG2 */
 #else /* DO_DEBUG */
 # define ROSH_DEBUG(f, ...)    ((void)0)
-# define ROSH_DEBUG_ARGV(int argc, char *argv[])       ((void)0)
+# define ROSH_DEBUG_ARGV(argc, argv)   ((void)0)
 # define ROSH_DEBUG2(f, ...)   ((void)0)
 #endif /* DO_DEBUG */