bb_applet_name -> applet_name
diff --git a/applets/applets.c b/applets/applets.c
index d5b2672..d615ffc 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -469,7 +469,7 @@
/* Do a binary search to find the applet entry given the name. */
applet_using = find_applet_by_name(name);
if (applet_using) {
- bb_applet_name = applet_using->name;
+ applet_name = applet_using->name;
if(argc==2 && !strcmp(argv[1], "--help")) bb_show_usage();
if(ENABLE_FEATURE_SUID) check_suid(applet_using);
exit((*(applet_using->main))(argc, argv));
diff --git a/applets/busybox.c b/applets/busybox.c
index 53eb363..625a492 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -6,7 +6,7 @@
*/
#include "busybox.h"
-const char *bb_applet_name ATTRIBUTE_EXTERNALLY_VISIBLE;
+const char *applet_name ATTRIBUTE_EXTERNALLY_VISIBLE;
#ifdef CONFIG_FEATURE_INSTALLER
/*
@@ -59,16 +59,16 @@
{
const char *s;
- bb_applet_name=argv[0];
- if (*bb_applet_name == '-') bb_applet_name++;
- for (s = bb_applet_name; *s ;)
- if (*(s++) == '/') bb_applet_name = s;
+ applet_name=argv[0];
+ if (*applet_name == '-') applet_name++;
+ for (s = applet_name; *s ;)
+ if (*(s++) == '/') applet_name = s;
/* Set locale for everybody except `init' */
if(ENABLE_LOCALE_SUPPORT && getpid() != 1)
setlocale(LC_ALL, "");
- run_applet_by_name(bb_applet_name, argc, argv);
+ run_applet_by_name(applet_name, argc, argv);
bb_error_msg_and_die("applet not found");
}
@@ -106,7 +106,8 @@
if (argc==1 || !strcmp(argv[1],"--help") ) {
if (argc>2) {
- run_applet_by_name(bb_applet_name=argv[2], 2, argv);
+ applet_name = argv[2];
+ run_applet_by_name(applet_name, 2, argv);
} else {
const struct BB_applet *a;
int col, output_width;
diff --git a/applets/individual.c b/applets/individual.c
index 911f760..b5d1e12 100644
--- a/applets/individual.c
+++ b/applets/individual.c
@@ -5,7 +5,7 @@
* Licensed under GPL version 2, see file LICENSE in this tarball for details
*/
-const char *bb_applet_name;
+const char *applet_name;
#include <stdio.h>
#include <stdlib.h>
@@ -14,7 +14,7 @@
int main(int argc, char *argv[])
{
- bb_applet_name=argv[0];
+ applet_name=argv[0];
return APPLET_main(argc,argv);
}
diff --git a/archival/bunzip2.c b/archival/bunzip2.c
index faf997b..85f2343 100644
--- a/archival/bunzip2.c
+++ b/archival/bunzip2.c
@@ -32,7 +32,7 @@
}
/* if called as bzcat force the stdout flag */
- if ((opt & BUNZIP2_OPT_STDOUT) || bb_applet_name[2] == 'c')
+ if ((opt & BUNZIP2_OPT_STDOUT) || applet_name[2] == 'c')
filename = 0;
/* Check that the input is sane. */
diff --git a/archival/gunzip.c b/archival/gunzip.c
index 1cde08b..396ce4f 100644
--- a/archival/gunzip.c
+++ b/archival/gunzip.c
@@ -44,7 +44,7 @@
opt = getopt32(argc, argv, "cftdv");
/* if called as zcat */
- if (strcmp(bb_applet_name, "zcat") == 0) {
+ if (strcmp(applet_name, "zcat") == 0) {
opt |= GUNZIP_OPT_STDOUT;
}
diff --git a/archival/unlzma.c b/archival/unlzma.c
index 20891e3..46fbefd 100644
--- a/archival/unlzma.c
+++ b/archival/unlzma.c
@@ -35,7 +35,7 @@
}
/* if called as lzmacat force the stdout flag */
- if ((opt & UNLZMA_OPT_STDOUT) || bb_applet_name[4] == 'c')
+ if ((opt & UNLZMA_OPT_STDOUT) || applet_name[4] == 'c')
filename = 0;
if (filename) {
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 30dbc02..69f28fa 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -13,6 +13,7 @@
/* option vars */
static const char optstring[] = "b:c:f:d:sn";
+
#define CUT_OPT_BYTE_FLGS (1<<0)
#define CUT_OPT_CHAR_FLGS (1<<1)
#define CUT_OPT_FIELDS_FLGS (1<<2)
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index a8038a6..1ed8771 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -87,7 +87,7 @@
int o;
/* See if we are supposed to be doing dos2unix or unix2dos */
- if (bb_applet_name[0] == 'd') {
+ if (applet_name[0] == 'd') {
ConvType = CT_DOS2UNIX; /*2 */
} else {
ConvType = CT_UNIX2DOS; /*1 */
diff --git a/docs/busybox.net/FAQ.html b/docs/busybox.net/FAQ.html
index af20366..2865ba1 100644
--- a/docs/busybox.net/FAQ.html
+++ b/docs/busybox.net/FAQ.html
@@ -521,7 +521,7 @@
applets.</p>
<p>Busybox execution starts with the main() function in applets/busybox.c,
-which sets the global variable bb_applet_name to argv[0] and calls
+which sets the global variable applet_name to argv[0] and calls
run_applet_by_name() in applets/applets.c. That uses the applets[] array
(defined in include/busybox.h and filled out in include/applets.h) to
transfer control to the appropriate APPLET_main() function (such as
diff --git a/e2fsprogs/mke2fs.c b/e2fsprogs/mke2fs.c
index 72ce574..f2cce75 100644
--- a/e2fsprogs/mke2fs.c
+++ b/e2fsprogs/mke2fs.c
@@ -841,7 +841,7 @@
#endif
/* If called as mkfs.ext3, create a journal inode */
- if (last_char_is(bb_applet_name, '3'))
+ if (last_char_is(applet_name, '3'))
journal_size = -1;
while ((c = getopt (argc, argv,
diff --git a/e2fsprogs/tune2fs.c b/e2fsprogs/tune2fs.c
index d64c128..9bd6f4c 100644
--- a/e2fsprogs/tune2fs.c
+++ b/e2fsprogs/tune2fs.c
@@ -596,9 +596,9 @@
if (ENABLE_FEATURE_CLEAN_UP)
atexit(tune2fs_clean_up);
- if (ENABLE_FINDFS && (bb_applet_name[0] == 'f')) /* findfs */
+ if (ENABLE_FINDFS && (applet_name[0] == 'f')) /* findfs */
do_findfs(argc, argv); /* no return */
- else if (ENABLE_E2LABEL && (bb_applet_name[0] == 'e')) /* e2label */
+ else if (ENABLE_E2LABEL && (applet_name[0] == 'e')) /* e2label */
parse_e2label_options(argc, argv);
else
parse_tune2fs_options(argc, argv); /* tune2fs */
diff --git a/findutils/grep.c b/findutils/grep.c
index 35e6aff..ce975e7 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -356,14 +356,14 @@
if (opt & GREP_OPT_f)
load_regexes_from_file(fopt);
- if (ENABLE_FEATURE_GREP_FGREP_ALIAS && bb_applet_name[0] == 'f')
+ if (ENABLE_FEATURE_GREP_FGREP_ALIAS && applet_name[0] == 'f')
opt |= GREP_OPT_F;
if (!(opt & GREP_OPT_o))
reflags = REG_NOSUB;
if (ENABLE_FEATURE_GREP_EGREP_ALIAS &&
- (bb_applet_name[0] == 'e' || (opt & GREP_OPT_E)))
+ (applet_name[0] == 'e' || (opt & GREP_OPT_E)))
reflags |= REG_EXTENDED;
if (opt & GREP_OPT_i)
diff --git a/findutils/xargs.c b/findutils/xargs.c
index 2783823..81997b6 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -523,12 +523,12 @@
#ifdef TEST
-const char *bb_applet_name = "debug stuff usage";
+const char *applet_name = "debug stuff usage";
void bb_show_usage(void)
{
fprintf(stderr, "Usage: %s [-p] [-r] [-t] -[x] [-n max_arg] [-s max_chars]\n",
- bb_applet_name);
+ applet_name);
exit(1);
}
diff --git a/include/libbb.h b/include/libbb.h
index 4e96ea4..88847ac 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -372,7 +372,7 @@
FILEUTILS_INTERACTIVE = 16
};
-extern const char *bb_applet_name;
+extern const char *applet_name;
extern const char bb_msg_full_version[];
extern const char bb_msg_memory_exhausted[];
diff --git a/init/halt.c b/init/halt.c
index d796a4a..2ac210e 100644
--- a/init/halt.c
+++ b/init/halt.c
@@ -31,7 +31,7 @@
int which, flags, rc = 1;
/* Figure out which applet we're running */
- for(which=0;delay[which]!=*bb_applet_name;which++);
+ for(which=0;delay[which]!=*applet_name;which++);
/* Parse and handle arguments */
flags = getopt32(argc, argv, "d:nf", &delay);
diff --git a/init/init.c b/init/init.c
index d7d14a2..8257b7f 100644
--- a/init/init.c
+++ b/init/init.c
@@ -195,7 +195,7 @@
/* Log the message to syslogd */
if (device & LOG) {
/* don`t out "\r\n" */
- openlog(bb_applet_name, 0, LOG_DAEMON);
+ openlog(applet_name, 0, LOG_DAEMON);
syslog(LOG_INFO, "%s", msg + 1);
closelog();
}
@@ -982,7 +982,7 @@
#if !ENABLE_DEBUG_INIT
/* Expect to be invoked as init with PID=1 or be invoked as linuxrc */
if (getpid() != 1 &&
- (!ENABLE_FEATURE_INITRD || !strstr(bb_applet_name, "linuxrc")))
+ (!ENABLE_FEATURE_INITRD || !strstr(applet_name, "linuxrc")))
{
bb_show_usage();
}
diff --git a/init/init_shared.c b/init/init_shared.c
index 5e46abf..47480fc 100644
--- a/init/init_shared.c
+++ b/init/init_shared.c
@@ -31,7 +31,7 @@
#endif
reboot(RB_ENABLE_CAD);
- openlog(bb_applet_name, 0, pri);
+ openlog(applet_name, 0, pri);
message = "\nThe system is going down NOW !!";
syslog(pri, "%s", message);
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index d2794e7..bd9c9f7 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -127,7 +127,7 @@
if (dest_exists) {
if (flags & FILEUTILS_INTERACTIVE) {
- fprintf(stderr, "%s: overwrite `%s'? ", bb_applet_name, dest);
+ fprintf(stderr, "%s: overwrite `%s'? ", applet_name, dest);
if (!bb_ask_confirmation()) {
close (src_fd);
return 0;
diff --git a/libbb/remove_file.c b/libbb/remove_file.c
index 92534a1..509aa6a 100644
--- a/libbb/remove_file.c
+++ b/libbb/remove_file.c
@@ -53,7 +53,7 @@
if ((!(flags & FILEUTILS_FORCE) && access(path, W_OK) < 0 &&
isatty(0)) ||
(flags & FILEUTILS_INTERACTIVE)) {
- fprintf(stderr, "%s: descend into directory `%s'? ", bb_applet_name,
+ fprintf(stderr, "%s: descend into directory `%s'? ", applet_name,
path);
if (!bb_ask_confirmation())
return 0;
@@ -80,7 +80,7 @@
}
if (flags & FILEUTILS_INTERACTIVE) {
- fprintf(stderr, "%s: remove directory `%s'? ", bb_applet_name, path);
+ fprintf(stderr, "%s: remove directory `%s'? ", applet_name, path);
if (!bb_ask_confirmation())
return status;
}
@@ -96,7 +96,7 @@
!S_ISLNK(path_stat.st_mode) &&
isatty(0)) ||
(flags & FILEUTILS_INTERACTIVE)) {
- fprintf(stderr, "%s: remove `%s'? ", bb_applet_name, path);
+ fprintf(stderr, "%s: remove `%s'? ", applet_name, path);
if (!bb_ask_confirmation())
return 0;
}
diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c
index e670d40..0f018c5 100644
--- a/libbb/verror_msg.c
+++ b/libbb/verror_msg.c
@@ -22,7 +22,7 @@
if (logmode & LOGMODE_STDIO) {
fflush(stdout);
- fprintf(stderr, "%s: ", bb_applet_name);
+ fprintf(stderr, "%s: ", applet_name);
vfprintf(stderr, s, p);
if (!strerr)
fputs(msg_eol, stderr);
diff --git a/loginutils/deluser.c b/loginutils/deluser.c
index 0cd4671..f432068 100644
--- a/loginutils/deluser.c
+++ b/loginutils/deluser.c
@@ -81,7 +81,7 @@
if (argc != 2) {
bb_show_usage();
} else {
- if (ENABLE_DELUSER && bb_applet_name[3] == 'u') {
+ if (ENABLE_DELUSER && applet_name[3] == 'u') {
del_line_matching(argv[1], bb_path_passwd_file);
if (ENABLE_FEATURE_SHADOWPASSWDS)
del_line_matching(argv[1], bb_path_shadow_file);
diff --git a/loginutils/getty.c b/loginutils/getty.c
index 6730fa8..4b43684 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -821,7 +821,7 @@
dup2(nullfd, 2);
if(nullfd > 2)
close(nullfd);
- openlog(bb_applet_name, LOG_PID, LOG_AUTH);
+ openlog(applet_name, LOG_PID, LOG_AUTH);
logmode = LOGMODE_BOTH;
#ifdef DEBUGGING
diff --git a/loginutils/login.c b/loginutils/login.c
index 1f392c1..8003922 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -268,7 +268,7 @@
bb_setpgrp;
- openlog(bb_applet_name, LOG_PID | LOG_CONS | LOG_NOWAIT, LOG_AUTH);
+ openlog(applet_name, LOG_PID | LOG_CONS | LOG_NOWAIT, LOG_AUTH);
while (1) {
if (!username[0])
diff --git a/loginutils/su.c b/loginutils/su.c
index 7894201..a23ee93 100644
--- a/loginutils/su.c
+++ b/loginutils/su.c
@@ -41,7 +41,7 @@
in this case resort to getpwuid. */
old_user = xstrdup(USE_FEATURE_UTMP(getlogin() ? : ) (pw = getpwuid(cur_uid)) ? pw->pw_name : "");
tty = ttyname(2) ? : "none";
- openlog(bb_applet_name, 0, LOG_AUTH);
+ openlog(applet_name, 0, LOG_AUTH);
}
pw = getpwnam(opt_username);
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
index 6edd258..40eb5e9 100644
--- a/loginutils/sulogin.c
+++ b/loginutils/sulogin.c
@@ -44,7 +44,7 @@
struct spwd *spwd;
logmode = LOGMODE_BOTH;
- openlog(bb_applet_name, 0, LOG_AUTH);
+ openlog(applet_name, 0, LOG_AUTH);
if (getopt32 (argc, argv, "t:", &timeout_arg)) {
if (safe_strtoi(timeout_arg, &timeout)) {
diff --git a/miscutils/crond.c b/miscutils/crond.c
index 4f25486..db0cc2c 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -205,7 +205,7 @@
*/
crondlog("\011%s " VERSION " dillon, started, log level %d\n",
- bb_applet_name, LogLevel);
+ applet_name, LogLevel);
SynchronizeDir();
@@ -305,7 +305,7 @@
static void startlogger(void)
{
if (LogFile == 0) {
- openlog(bb_applet_name, LOG_CONS | LOG_PID, LOG_CRON);
+ openlog(applet_name, LOG_CONS | LOG_PID, LOG_CRON);
}
#if ENABLE_DEBUG_CROND_OPTION
else { /* test logfile */
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index 0f36970..f1fee2c 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -306,7 +306,7 @@
va_start(ap, fmt);
ret = access ("/dev/log", F_OK);
if (ret == 0) {
- openlog(bb_applet_name, 0, LOG_DAEMON);
+ openlog(applet_name, 0, LOG_DAEMON);
vsyslog( pri , fmt, ap);
/* Man: A trailing newline is added when needed. */
closelog();
@@ -492,7 +492,7 @@
if ( print_version || (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev) )
{
bb_printf( "%s v%s\nDaemon %s:\t%d\nKernel-side %s:\t%d\n",
- bb_applet_name,DEVFSD_VERSION,bb_msg_proto_rev,
+ applet_name,DEVFSD_VERSION,bb_msg_proto_rev,
DEVFSD_PROTOCOL_REVISION_DAEMON,bb_msg_proto_rev, proto_rev);
if (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev)
bb_error_msg_and_die( "%s mismatch!",bb_msg_proto_rev);
@@ -509,7 +509,7 @@
if (sigaction (SIGHUP, &new_action, NULL) != 0 || sigaction (SIGUSR1, &new_action, NULL) != 0 )
devfsd_error_msg_and_die( "sigaction");
- bb_printf("%s v%s started for %s\n",bb_applet_name, DEVFSD_VERSION, mount_point);
+ bb_printf("%s v%s started for %s\n",applet_name, DEVFSD_VERSION, mount_point);
/* Set umask so that mknod(2), open(2) and mkdir(2) have complete control over permissions */
umask (0);
diff --git a/networking/fakeidentd.c b/networking/fakeidentd.c
index 6070e5f..c8d3276 100644
--- a/networking/fakeidentd.c
+++ b/networking/fakeidentd.c
@@ -219,7 +219,7 @@
int fakeidentd_main(int argc, char **argv)
{
/* This applet is an inetd-style daemon */
- openlog(bb_applet_name, 0, LOG_DAEMON);
+ openlog(applet_name, 0, LOG_DAEMON);
logmode = LOGMODE_SYSLOG;
memset(conns, 0, sizeof(conns));
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 25b7f14..4928541 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -288,10 +288,10 @@
int (*ftp_action)(ftp_host_info_t *, FILE *, const char *, char *) = NULL;
/* Check to see if the command is ftpget or ftput */
- if (ENABLE_FTPPUT && (!ENABLE_FTPGET || bb_applet_name[3] == 'p')) {
+ if (ENABLE_FTPPUT && (!ENABLE_FTPGET || applet_name[3] == 'p')) {
ftp_action = ftp_send;
}
- if (ENABLE_FTPGET && (!ENABLE_FTPPUT || bb_applet_name[3] == 'g')) {
+ if (ENABLE_FTPGET && (!ENABLE_FTPPUT || applet_name[3] == 'g')) {
ftp_action = ftp_receive;
}
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index f342875..6334cbc 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -1080,7 +1080,7 @@
int any_failures = 0;
int i;
- if (bb_applet_name[2] == 'u') {
+ if (applet_name[2] == 'u') {
/* ifup command */
cmds = iface_up;
} else {
diff --git a/networking/inetd.c b/networking/inetd.c
index 350f91d..e22115a 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -1251,7 +1251,7 @@
LastArg = envp[-1] + strlen(envp[-1]);
#endif
- openlog(bb_applet_name, LOG_PID | LOG_NOWAIT, LOG_DAEMON);
+ openlog(applet_name, LOG_PID | LOG_NOWAIT, LOG_DAEMON);
opt = getopt32(argc, argv, "R:f", &stoomany);
if(opt & 1) {
diff --git a/networking/nameif.c b/networking/nameif.c
index 146ecce..f60a97e 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -66,7 +66,7 @@
mactable_t *ch;
if (1 & getopt32(argc, argv, "sc:", &fname)) {
- openlog(bb_applet_name, 0, LOG_LOCAL0);
+ openlog(applet_name, 0, LOG_LOCAL0);
logmode = LOGMODE_SYSLOG;
}
diff --git a/networking/telnetd.c b/networking/telnetd.c
index 808d4be..1c4dede 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -384,7 +384,7 @@
* look into syslog for all errors, even early ones.
* Direct all output to syslog at once.
*/
- openlog(bb_applet_name, 0, LOG_USER);
+ openlog(applet_name, 0, LOG_USER);
logmode = LOGMODE_SYSLOG;
opt = getopt32(argc, argv, "f:l:" USE_FEATURE_TELNETD_INETD("p:b:"),
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 042cbe3..4af5236 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -697,7 +697,7 @@
if (cc < 0)
bb_perror_msg_and_die("sendto");
printf("%s: wrote %s %d chars, ret=%d\n",
- bb_applet_name, hostname, packlen, cc);
+ applet_name, hostname, packlen, cc);
(void)fflush(stdout);
}
}
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
index c34b3de..ca0c79b 100644
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
@@ -82,9 +82,9 @@
setlinebuf(stdout);
if (ENABLE_FEATURE_UDHCP_SYSLOG) {
- openlog(bb_applet_name, LOG_PID, LOG_LOCAL0);
+ openlog(applet_name, LOG_PID, LOG_LOCAL0);
logmode |= LOGMODE_SYSLOG;
}
- bb_info_msg("%s (v%s) started", bb_applet_name, BB_VER);
+ bb_info_msg("%s (v%s) started", applet_name, BB_VER);
}
diff --git a/networking/zcip.c b/networking/zcip.c
index d9c1adf..6bd7f25 100644
--- a/networking/zcip.c
+++ b/networking/zcip.c
@@ -222,7 +222,7 @@
if (!FOREGROUND) {
/* Do it early, before all bb_xx_msg calls */
logmode = LOGMODE_SYSLOG;
- openlog(bb_applet_name, 0, LOG_DAEMON);
+ openlog(applet_name, 0, LOG_DAEMON);
}
if (opts & 4) { // -r n.n.n.n
if (inet_aton(r_opt, &ip) == 0
diff --git a/procps/kill.c b/procps/kill.c
index fe9b242..2408a70 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -15,10 +15,10 @@
char *arg;
pid_t pid;
int signo = SIGTERM, errors = 0, quiet = 0;
- const int killall = (ENABLE_KILLALL && bb_applet_name[4]=='a'
- && (!ENABLE_KILLALL5 || bb_applet_name[7]!='5'));
- const int killall5 = (ENABLE_KILLALL5 && bb_applet_name[4]=='a'
- && (!ENABLE_KILLALL || bb_applet_name[7]=='5'));
+ const int killall = (ENABLE_KILLALL && applet_name[4]=='a'
+ && (!ENABLE_KILLALL5 || applet_name[7]!='5'));
+ const int killall5 = (ENABLE_KILLALL5 && applet_name[4]=='a'
+ && (!ENABLE_KILLALL || applet_name[7]=='5'));
/* Parse any options */
argc--;
diff --git a/runit/chpst.c b/runit/chpst.c
index ced2838..1ee9b8d 100644
--- a/runit/chpst.c
+++ b/runit/chpst.c
@@ -230,10 +230,10 @@
int chpst_main(int argc, char **argv)
{
- if (bb_applet_name[3] == 'd') envdir(argc, argv);
- if (bb_applet_name[1] == 'o') softlimit(argc, argv);
- if (bb_applet_name[0] == 's') setuidgid(argc, argv);
- if (bb_applet_name[0] == 'e') envuidgid(argc, argv);
+ if (applet_name[3] == 'd') envdir(argc, argv);
+ if (applet_name[1] == 'o') softlimit(argc, argv);
+ if (applet_name[0] == 's') setuidgid(argc, argv);
+ if (applet_name[0] == 'e') envuidgid(argc, argv);
// otherwise we are.......... chpst
{
diff --git a/shell/ash.c b/shell/ash.c
index 7d4da43..0d9fa7f 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -3753,7 +3753,7 @@
while (*c != NULL) {
c++; argc++;
}
- bb_applet_name = cmd;
+ applet_name = cmd;
exit(a->main(argc, argv));
}
#ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
@@ -13658,7 +13658,7 @@
#ifdef DEBUG
-const char *bb_applet_name = "debug stuff usage";
+const char *applet_name = "debug stuff usage";
int main(int argc, char **argv)
{
return ash_main(argc, argv);
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index 9a57f75..a9fc847 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -1892,7 +1892,7 @@
#ifdef TEST
-const char *bb_applet_name = "debug stuff usage";
+const char *applet_name = "debug stuff usage";
#ifdef CONFIG_FEATURE_NONPRINTABLE_INVERSE_PUT
#include <locale.h>
diff --git a/shell/lash.c b/shell/lash.c
index 9c862a1..c499612 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -1145,7 +1145,7 @@
/* Check if the command matches any of the forking builtins. */
for (x = bltins_forking; x->cmd; x++) {
if (strcmp(child->argv[0], x->cmd) == 0) {
- bb_applet_name=x->cmd;
+ applet_name=x->cmd;
_exit (x->function(child));
}
}
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index 5d110bc..2293d3e 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -24,7 +24,7 @@
fd = xopen(argv[1], O_RDWR);
// Act like freeramdisk, fdflush, or both depending on configuration.
- result = ioctl(fd, (ENABLE_FREERAMDISK && bb_applet_name[1]=='r')
+ result = ioctl(fd, (ENABLE_FREERAMDISK && applet_name[1]=='r')
|| !ENABLE_FDFLUSH ? BLKFLSBUF : FDFLUSH);
if (ENABLE_FEATURE_CLEAN_UP) close(fd);
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index c0dda2f..a2ca7a5 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -1343,7 +1343,7 @@
* flags and whether or not the -f switch was specified on the
* command line.
*/
- printf("%s, %s\n", bb_applet_name, program_version);
+ printf("%s, %s\n", applet_name, program_version);
if (!(Super.s_state & MINIX_ERROR_FS) &&
(Super.s_state & MINIX_VALID_FS) && !force) {
if (repair)
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 899bf85..141517b 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -707,7 +707,7 @@
dup2(fd, 2);
if (fd > 2) close(fd);
setsid();
- openlog(bb_applet_name, LOG_PID, LOG_DAEMON);
+ openlog(applet_name, LOG_PID, LOG_DAEMON);
logmode = LOGMODE_SYSLOG;
return 1;
}
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 4fcb239..8434d12 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -24,7 +24,7 @@
if (st.st_blocks * 512 < st.st_size)
bb_error_msg_and_die("swap file has holes");
- if (bb_applet_name[5] == 'n')
+ if (applet_name[5] == 'n')
status = swapon(device, 0);
else
status = swapoff(device);