summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko2007-09-07 19:33:56 +0000
committerDenis Vlasenko2007-09-07 19:33:56 +0000
commitc8d4d2f11d106f509a347787e223d863e8faa235 (patch)
tree71fabb4fa5104b79fd596fd910cf594d765904c0 /libbb
parentd7ecd863c855a53e263486e742a4adfb871d9127 (diff)
downloadbusybox-c8d4d2f11d106f509a347787e223d863e8faa235.zip
busybox-c8d4d2f11d106f509a347787e223d863e8faa235.tar.gz
messages: by popular request allow PATH to be customized at build time
mount: smallish code shrink
Diffstat (limited to 'libbb')
-rw-r--r--libbb/messages.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/libbb/messages.c b/libbb/messages.c
index c4052b1..0e43ab6 100644
--- a/libbb/messages.c
+++ b/libbb/messages.c
@@ -7,13 +7,21 @@
#include "libbb.h"
+/* allow default system PATH to be extended via CFLAGS */
+#ifndef BB_ADDITIONAL_PATH
+#define BB_ADDITIONAL_PATH ""
+#endif
+
+/* allow version to be extended, via CFLAGS */
#ifndef BB_EXTRA_VERSION
-#define BANNER "BusyBox v" BB_VER " (" BB_BT ")"
-#else
-#define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")"
+#define BB_EXTRA_VERSION BB_BT
#endif
+
+#define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")"
+
const char bb_banner[] ALIGN1 = BANNER;
+
const char bb_msg_memory_exhausted[] ALIGN1 = "memory exhausted";
const char bb_msg_invalid_date[] ALIGN1 = "invalid date '%s'";
const char bb_msg_write_error[] ALIGN1 = "write error";
@@ -39,7 +47,8 @@ const char bb_busybox_exec_path[] ALIGN1 = CONFIG_BUSYBOX_EXEC_PATH;
const char bb_default_login_shell[] ALIGN1 = 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_PATH_root_path[] ALIGN1 = "PATH=/sbin:/usr/sbin:/bin:/usr/bin";
+const char bb_PATH_root_path[] ALIGN1 =
+ "PATH=/sbin:/usr/sbin:/bin:/usr/bin" BB_ADDITIONAL_PATH;
const int const_int_0;
@@ -49,11 +58,11 @@ const int const_int_1 = 1;
/* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */
const char bb_path_wtmp_file[] ALIGN1 =
#if defined _PATH_WTMP
-_PATH_WTMP;
+ _PATH_WTMP;
#elif defined WTMP_FILE
-WTMP_FILE;
+ WTMP_FILE;
#else
-# error unknown path to wtmp file
+#error unknown path to wtmp file
#endif
char bb_common_bufsiz1[COMMON_BUFSIZE];