From 81dc3bbd5faf59405bee1398239d14b30f92cca6 Mon Sep 17 00:00:00 2001 From: Gene Cumm Date: Thu, 30 Sep 2010 23:08:24 -0400 Subject: [PATCH] rosh: fix errors in previous commit --- com32/rosh/rosh.c | 5 ++++- com32/rosh/rosh.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/com32/rosh/rosh.c b/com32/rosh/rosh.c index 0d51f22..aac6044 100644 --- a/com32/rosh/rosh.c +++ b/com32/rosh/rosh.c @@ -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 diff --git a/com32/rosh/rosh.h b/com32/rosh/rosh.h index 907df1e..6e312ed 100644 --- a/com32/rosh/rosh.h +++ b/com32/rosh/rosh.h @@ -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 */ -- 2.7.4