aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-02-14 21:23:06 +0000
committerEric Andersen <andersen@codepoet.org>2001-02-14 21:23:06 +0000
commit67991cf824f8df27e74c92d754fb507681c69ce6 (patch)
treea0b652f3dc794d1050c1a8de3afb014a621238fa /shell
parent68be2ab914e1e20fe666bbd22a89a18714be2789 (diff)
downloadbusybox-67991cf824f8df27e74c92d754fb507681c69ce6.tar.gz
This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed.
Diffstat (limited to 'shell')
-rw-r--r--shell/lash.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/shell/lash.c b/shell/lash.c
index b1a7b93cf..9519538dc 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -1370,7 +1370,6 @@ static int pseudo_exec(struct child_prog *child)
{
struct built_in_command *x;
#ifdef BB_FEATURE_SH_STANDALONE_SHELL
- struct BB_applet *applet;
char *name;
#endif
@@ -1415,14 +1414,12 @@ static int pseudo_exec(struct child_prog *child)
name = get_last_path_component(name);
#endif
- /* Do a binary search to find the applet entry given the name. */
- if ((applet = find_applet_by_name(name)) != NULL) {
- int argc_l;
- char** argv=child->argv;
- for(argc_l=0;*argv!=NULL; argv++, argc_l++);
- applet_name=applet->name;
- optind = 1;
- exit((*(applet->main)) (argc_l, child->argv));
+ {
+ char** argv=child->argv;
+ int argc_l;
+ for(argc_l=0;*argv!=NULL; argv++, argc_l++);
+ optind = 1;
+ run_applet_by_name(name, argc_l, child->argv);
}
#endif
@@ -1750,7 +1747,7 @@ int shell_main(int argc_l, char **argv_l)
interactive = TRUE;
break;
default:
- usage(shell_usage);
+ show_usage();
}
}
/* A shell is interactive if the `-i' flag was given, or if all of