Cleanup patch from Larry

This commit is contained in:
Eric Andersen 2001-03-09 00:42:46 +00:00
parent 13d1fa1d01
commit b180dd9e50
3 changed files with 15 additions and 6 deletions

7
lash.c
View File

@ -61,6 +61,9 @@
#include <unistd.h> #include <unistd.h>
#include <getopt.h> #include <getopt.h>
#undef __GLIBC__
#undef __UCLIBC__
#if ( (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) ) || defined (__UCLIBC__) #if ( (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) ) || defined (__UCLIBC__)
#include <wordexp.h> #include <wordexp.h>
#define expand_t wordexp_t #define expand_t wordexp_t
@ -983,7 +986,7 @@ static int expand_arguments(char *command)
error_msg("out of space during expansion"); error_msg("out of space during expansion");
return FALSE; return FALSE;
} }
if (retval == GLOB_ABORTED || retval == GLOB_NOSYS) { if (retval != 0 && retval != GLOB_NOMATCH) {
/* Some other error. */ /* Some other error. */
error_msg("syntax error"); error_msg("syntax error");
return FALSE; return FALSE;
@ -1722,9 +1725,9 @@ static int busy_loop(FILE * input)
#ifdef BB_FEATURE_SH_ENVIRONMENT #ifdef BB_FEATURE_SH_ENVIRONMENT
last_return_code=WEXITSTATUS(status); last_return_code=WEXITSTATUS(status);
#endif
debug_printf("'%s' exited -- return code %d\n", debug_printf("'%s' exited -- return code %d\n",
job_list.fg->text, last_return_code); job_list.fg->text, last_return_code);
#endif
if (!job_list.fg->running_progs) { if (!job_list.fg->running_progs) {
/* child exited */ /* child exited */
remove_job(&job_list, job_list.fg); remove_job(&job_list, job_list.fg);

7
sh.c
View File

@ -61,6 +61,9 @@
#include <unistd.h> #include <unistd.h>
#include <getopt.h> #include <getopt.h>
#undef __GLIBC__
#undef __UCLIBC__
#if ( (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) ) || defined (__UCLIBC__) #if ( (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) ) || defined (__UCLIBC__)
#include <wordexp.h> #include <wordexp.h>
#define expand_t wordexp_t #define expand_t wordexp_t
@ -983,7 +986,7 @@ static int expand_arguments(char *command)
error_msg("out of space during expansion"); error_msg("out of space during expansion");
return FALSE; return FALSE;
} }
if (retval == GLOB_ABORTED || retval == GLOB_NOSYS) { if (retval != 0 && retval != GLOB_NOMATCH) {
/* Some other error. */ /* Some other error. */
error_msg("syntax error"); error_msg("syntax error");
return FALSE; return FALSE;
@ -1722,9 +1725,9 @@ static int busy_loop(FILE * input)
#ifdef BB_FEATURE_SH_ENVIRONMENT #ifdef BB_FEATURE_SH_ENVIRONMENT
last_return_code=WEXITSTATUS(status); last_return_code=WEXITSTATUS(status);
#endif
debug_printf("'%s' exited -- return code %d\n", debug_printf("'%s' exited -- return code %d\n",
job_list.fg->text, last_return_code); job_list.fg->text, last_return_code);
#endif
if (!job_list.fg->running_progs) { if (!job_list.fg->running_progs) {
/* child exited */ /* child exited */
remove_job(&job_list, job_list.fg); remove_job(&job_list, job_list.fg);

View File

@ -61,6 +61,9 @@
#include <unistd.h> #include <unistd.h>
#include <getopt.h> #include <getopt.h>
#undef __GLIBC__
#undef __UCLIBC__
#if ( (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) ) || defined (__UCLIBC__) #if ( (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) ) || defined (__UCLIBC__)
#include <wordexp.h> #include <wordexp.h>
#define expand_t wordexp_t #define expand_t wordexp_t
@ -983,7 +986,7 @@ static int expand_arguments(char *command)
error_msg("out of space during expansion"); error_msg("out of space during expansion");
return FALSE; return FALSE;
} }
if (retval == GLOB_ABORTED || retval == GLOB_NOSYS) { if (retval != 0 && retval != GLOB_NOMATCH) {
/* Some other error. */ /* Some other error. */
error_msg("syntax error"); error_msg("syntax error");
return FALSE; return FALSE;
@ -1722,9 +1725,9 @@ static int busy_loop(FILE * input)
#ifdef BB_FEATURE_SH_ENVIRONMENT #ifdef BB_FEATURE_SH_ENVIRONMENT
last_return_code=WEXITSTATUS(status); last_return_code=WEXITSTATUS(status);
#endif
debug_printf("'%s' exited -- return code %d\n", debug_printf("'%s' exited -- return code %d\n",
job_list.fg->text, last_return_code); job_list.fg->text, last_return_code);
#endif
if (!job_list.fg->running_progs) { if (!job_list.fg->running_progs) {
/* child exited */ /* child exited */
remove_job(&job_list, job_list.fg); remove_job(&job_list, job_list.fg);