diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-07 19:33:56 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-07 19:33:56 +0000 |
commit | c8d4d2f11d106f509a347787e223d863e8faa235 (patch) | |
tree | 71fabb4fa5104b79fd596fd910cf594d765904c0 | |
parent | d7ecd863c855a53e263486e742a4adfb871d9127 (diff) | |
download | busybox-w32-c8d4d2f11d106f509a347787e223d863e8faa235.tar.gz busybox-w32-c8d4d2f11d106f509a347787e223d863e8faa235.tar.bz2 busybox-w32-c8d4d2f11d106f509a347787e223d863e8faa235.zip |
messages: by popular request allow PATH to be customized at build time
mount: smallish code shrink
-rw-r--r-- | libbb/messages.c | 23 | ||||
-rw-r--r-- | util-linux/mount.c | 5 |
2 files changed, 18 insertions, 10 deletions
diff --git a/libbb/messages.c b/libbb/messages.c index c4052b187..0e43ab674 100644 --- a/libbb/messages.c +++ b/libbb/messages.c | |||
@@ -7,13 +7,21 @@ | |||
7 | 7 | ||
8 | #include "libbb.h" | 8 | #include "libbb.h" |
9 | 9 | ||
10 | /* allow default system PATH to be extended via CFLAGS */ | ||
11 | #ifndef BB_ADDITIONAL_PATH | ||
12 | #define BB_ADDITIONAL_PATH "" | ||
13 | #endif | ||
14 | |||
15 | /* allow version to be extended, via CFLAGS */ | ||
10 | #ifndef BB_EXTRA_VERSION | 16 | #ifndef BB_EXTRA_VERSION |
11 | #define BANNER "BusyBox v" BB_VER " (" BB_BT ")" | 17 | #define BB_EXTRA_VERSION BB_BT |
12 | #else | ||
13 | #define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")" | ||
14 | #endif | 18 | #endif |
19 | |||
20 | #define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")" | ||
21 | |||
15 | const char bb_banner[] ALIGN1 = BANNER; | 22 | const char bb_banner[] ALIGN1 = BANNER; |
16 | 23 | ||
24 | |||
17 | const char bb_msg_memory_exhausted[] ALIGN1 = "memory exhausted"; | 25 | const char bb_msg_memory_exhausted[] ALIGN1 = "memory exhausted"; |
18 | const char bb_msg_invalid_date[] ALIGN1 = "invalid date '%s'"; | 26 | const char bb_msg_invalid_date[] ALIGN1 = "invalid date '%s'"; |
19 | const char bb_msg_write_error[] ALIGN1 = "write error"; | 27 | const char bb_msg_write_error[] ALIGN1 = "write error"; |
@@ -39,7 +47,8 @@ const char bb_busybox_exec_path[] ALIGN1 = CONFIG_BUSYBOX_EXEC_PATH; | |||
39 | const char bb_default_login_shell[] ALIGN1 = LIBBB_DEFAULT_LOGIN_SHELL; | 47 | const char bb_default_login_shell[] ALIGN1 = LIBBB_DEFAULT_LOGIN_SHELL; |
40 | /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin, | 48 | /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin, |
41 | * but I want to save a few bytes here. Check libbb.h before changing! */ | 49 | * but I want to save a few bytes here. Check libbb.h before changing! */ |
42 | const char bb_PATH_root_path[] ALIGN1 = "PATH=/sbin:/usr/sbin:/bin:/usr/bin"; | 50 | const char bb_PATH_root_path[] ALIGN1 = |
51 | "PATH=/sbin:/usr/sbin:/bin:/usr/bin" BB_ADDITIONAL_PATH; | ||
43 | 52 | ||
44 | 53 | ||
45 | const int const_int_0; | 54 | const int const_int_0; |
@@ -49,11 +58,11 @@ const int const_int_1 = 1; | |||
49 | /* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */ | 58 | /* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */ |
50 | const char bb_path_wtmp_file[] ALIGN1 = | 59 | const char bb_path_wtmp_file[] ALIGN1 = |
51 | #if defined _PATH_WTMP | 60 | #if defined _PATH_WTMP |
52 | _PATH_WTMP; | 61 | _PATH_WTMP; |
53 | #elif defined WTMP_FILE | 62 | #elif defined WTMP_FILE |
54 | WTMP_FILE; | 63 | WTMP_FILE; |
55 | #else | 64 | #else |
56 | # error unknown path to wtmp file | 65 | #error unknown path to wtmp file |
57 | #endif | 66 | #endif |
58 | 67 | ||
59 | char bb_common_bufsiz1[COMMON_BUFSIZE]; | 68 | char bb_common_bufsiz1[COMMON_BUFSIZE]; |
diff --git a/util-linux/mount.c b/util-linux/mount.c index 3aadbf72d..91f09e15c 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -1527,11 +1527,10 @@ static int singlemount(struct mntent *mp, int ignore_busy) | |||
1527 | if (ENABLE_FEATURE_CLEAN_UP) | 1527 | if (ENABLE_FEATURE_CLEAN_UP) |
1528 | free(filteropts); | 1528 | free(filteropts); |
1529 | 1529 | ||
1530 | if (rc && errno == EBUSY && ignore_busy) | 1530 | if (errno == EBUSY && ignore_busy) |
1531 | rc = 0; | 1531 | return 0; |
1532 | if (rc < 0) | 1532 | if (rc < 0) |
1533 | bb_perror_msg("mounting %s on %s failed", mp->mnt_fsname, mp->mnt_dir); | 1533 | bb_perror_msg("mounting %s on %s failed", mp->mnt_fsname, mp->mnt_dir); |
1534 | |||
1535 | return rc; | 1534 | return rc; |
1536 | } | 1535 | } |
1537 | 1536 | ||