summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-03 21:00:43 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-03 21:00:43 +0000
commit8f8f268cfdecb4cabeb2e649a73afc7a485aeff5 (patch)
tree8c555cc94aca9fabd177526e554d93bed4886642 /applets
parent67b23e6043d8e2b30b0bf3bc105b8583c2a26db5 (diff)
downloadbusybox-w32-8f8f268cfdecb4cabeb2e649a73afc7a485aeff5.tar.gz
busybox-w32-8f8f268cfdecb4cabeb2e649a73afc7a485aeff5.tar.bz2
busybox-w32-8f8f268cfdecb4cabeb2e649a73afc7a485aeff5.zip
bb_applet_name -> applet_name
Diffstat (limited to 'applets')
-rw-r--r--applets/applets.c2
-rw-r--r--applets/busybox.c15
-rw-r--r--applets/individual.c4
3 files changed, 11 insertions, 10 deletions
diff --git a/applets/applets.c b/applets/applets.c
index d5b2672a0..d615ffcd8 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -469,7 +469,7 @@ void run_applet_by_name(const char *name, int argc, char **argv)
469 /* Do a binary search to find the applet entry given the name. */ 469 /* Do a binary search to find the applet entry given the name. */
470 applet_using = find_applet_by_name(name); 470 applet_using = find_applet_by_name(name);
471 if (applet_using) { 471 if (applet_using) {
472 bb_applet_name = applet_using->name; 472 applet_name = applet_using->name;
473 if(argc==2 && !strcmp(argv[1], "--help")) bb_show_usage(); 473 if(argc==2 && !strcmp(argv[1], "--help")) bb_show_usage();
474 if(ENABLE_FEATURE_SUID) check_suid(applet_using); 474 if(ENABLE_FEATURE_SUID) check_suid(applet_using);
475 exit((*(applet_using->main))(argc, argv)); 475 exit((*(applet_using->main))(argc, argv));
diff --git a/applets/busybox.c b/applets/busybox.c
index 53eb363ac..625a492f2 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -6,7 +6,7 @@
6 */ 6 */
7#include "busybox.h" 7#include "busybox.h"
8 8
9const char *bb_applet_name ATTRIBUTE_EXTERNALLY_VISIBLE; 9const char *applet_name ATTRIBUTE_EXTERNALLY_VISIBLE;
10 10
11#ifdef CONFIG_FEATURE_INSTALLER 11#ifdef CONFIG_FEATURE_INSTALLER
12/* 12/*
@@ -59,16 +59,16 @@ int main(int argc, char **argv)
59{ 59{
60 const char *s; 60 const char *s;
61 61
62 bb_applet_name=argv[0]; 62 applet_name=argv[0];
63 if (*bb_applet_name == '-') bb_applet_name++; 63 if (*applet_name == '-') applet_name++;
64 for (s = bb_applet_name; *s ;) 64 for (s = applet_name; *s ;)
65 if (*(s++) == '/') bb_applet_name = s; 65 if (*(s++) == '/') applet_name = s;
66 66
67 /* Set locale for everybody except `init' */ 67 /* Set locale for everybody except `init' */
68 if(ENABLE_LOCALE_SUPPORT && getpid() != 1) 68 if(ENABLE_LOCALE_SUPPORT && getpid() != 1)
69 setlocale(LC_ALL, ""); 69 setlocale(LC_ALL, "");
70 70
71 run_applet_by_name(bb_applet_name, argc, argv); 71 run_applet_by_name(applet_name, argc, argv);
72 bb_error_msg_and_die("applet not found"); 72 bb_error_msg_and_die("applet not found");
73} 73}
74 74
@@ -106,7 +106,8 @@ int busybox_main(int argc, char **argv)
106 106
107 if (argc==1 || !strcmp(argv[1],"--help") ) { 107 if (argc==1 || !strcmp(argv[1],"--help") ) {
108 if (argc>2) { 108 if (argc>2) {
109 run_applet_by_name(bb_applet_name=argv[2], 2, argv); 109 applet_name = argv[2];
110 run_applet_by_name(applet_name, 2, argv);
110 } else { 111 } else {
111 const struct BB_applet *a; 112 const struct BB_applet *a;
112 int col, output_width; 113 int col, output_width;
diff --git a/applets/individual.c b/applets/individual.c
index 911f760a6..b5d1e1298 100644
--- a/applets/individual.c
+++ b/applets/individual.c
@@ -5,7 +5,7 @@
5 * Licensed under GPL version 2, see file LICENSE in this tarball for details 5 * Licensed under GPL version 2, see file LICENSE in this tarball for details
6 */ 6 */
7 7
8const char *bb_applet_name; 8const char *applet_name;
9 9
10#include <stdio.h> 10#include <stdio.h>
11#include <stdlib.h> 11#include <stdlib.h>
@@ -14,7 +14,7 @@ const char *bb_applet_name;
14 14
15int main(int argc, char *argv[]) 15int main(int argc, char *argv[])
16{ 16{
17 bb_applet_name=argv[0]; 17 applet_name=argv[0];
18 18
19 return APPLET_main(argc,argv); 19 return APPLET_main(argc,argv);
20} 20}