summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko2007-06-12 22:35:19 +0000
committerDenis Vlasenko2007-06-12 22:35:19 +0000
commitf5f75c5e82d47613847c356664e47c4be69e73aa (patch)
treee71a09d744a9db75a1cbe6cb73d55e71a435e7d1 /libbb
parentf312e32662f6d98f86c68d8f781b3255547f8200 (diff)
downloadbusybox-f5f75c5e82d47613847c356664e47c4be69e73aa.zip
busybox-f5f75c5e82d47613847c356664e47c4be69e73aa.tar.gz
remove nearly-duplicate PATHs in several places
function old new delta bb_PATH_root_path - 35 +35 varunset 60 58 -2 arith 2042 2033 -9 bb_default_root_login_path 30 - -30 .rodata 128794 128762 -32 which_main 152 117 -35 defpathvar 40 - -40 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 0/4 up/down: 35/-148) Total: -113 bytes
Diffstat (limited to 'libbb')
-rw-r--r--libbb/messages.c2
-rw-r--r--libbb/setup_environment.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libbb/messages.c b/libbb/messages.c
index 27d2cc1..56cccaf 100644
--- a/libbb/messages.c
+++ b/libbb/messages.c
@@ -40,7 +40,7 @@ const char bb_busybox_exec_path[] = CONFIG_BUSYBOX_EXEC_PATH;
const char bb_default_login_shell[] = LIBBB_DEFAULT_LOGIN_SHELL;
/* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin,
* but I want to save a few bytes here. Check libbb.h before changing! */
-const char bb_default_root_login_path[] = "/sbin:/usr/sbin:/bin:/usr/bin";
+const char bb_PATH_root_path[] = "PATH=/sbin:/usr/sbin:/bin:/usr/bin";
const int const_int_0;
diff --git a/libbb/setup_environment.c b/libbb/setup_environment.c
index a98b9a5..a6f44f7 100644
--- a/libbb/setup_environment.c
+++ b/libbb/setup_environment.c
@@ -56,7 +56,7 @@ void setup_environment(const char *shell, int loginshell, int changeenv, const s
xsetenv("SHELL", shell);
xsetenv("USER", pw->pw_name);
xsetenv("LOGNAME", pw->pw_name);
- xsetenv("PATH", (pw->pw_uid ? bb_default_login_path : bb_default_root_login_path));
+ xsetenv("PATH", (pw->pw_uid ? bb_default_path : bb_default_root_path));
}
else if (changeenv) {
/* Set HOME, SHELL, and if not becoming a super-user,