aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 14:04:58 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 14:04:58 +1000
commitf28d4b20905b5b1f52ffa52060a0c6caf4b055ba (patch)
tree26196b8132f10ca96ac52d4aedc155138b475118 /libbb
parent0c9d2455301ed633826e222aacd930126990913e (diff)
parent0004e994934374b5695e004bbcb7b1fd67a170f2 (diff)
downloadbusybox-w32-f28d4b20905b5b1f52ffa52060a0c6caf4b055ba.tar.gz
busybox-w32-f28d4b20905b5b1f52ffa52060a0c6caf4b055ba.tar.bz2
busybox-w32-f28d4b20905b5b1f52ffa52060a0c6caf4b055ba.zip
Merge branch 'origin/master' (early part)
Conflicts: include/libbb.h libbb/messages.c
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Kbuild.src1
-rw-r--r--libbb/inet_common.c6
-rw-r--r--libbb/messages.c13
-rw-r--r--libbb/mtab_file.c15
4 files changed, 4 insertions, 31 deletions
diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src
index 4fbf486b5..f30fa4818 100644
--- a/libbb/Kbuild.src
+++ b/libbb/Kbuild.src
@@ -57,7 +57,6 @@ lib-y += md5.o
57#lib-y += md5prime.o 57#lib-y += md5prime.o
58lib-y += messages.o 58lib-y += messages.o
59lib-y += mode_string.o 59lib-y += mode_string.o
60lib-y += mtab_file.o
61lib-y += obscure.o 60lib-y += obscure.o
62lib-y += parse_mode.o 61lib-y += parse_mode.o
63lib-y += parse_config.o 62lib-y += parse_config.o
diff --git a/libbb/inet_common.c b/libbb/inet_common.c
index b47259089..e031ddf9b 100644
--- a/libbb/inet_common.c
+++ b/libbb/inet_common.c
@@ -23,7 +23,7 @@ int FAST_FUNC INET_resolve(const char *name, struct sockaddr_in *s_in, int hostf
23 s_in->sin_port = 0; 23 s_in->sin_port = 0;
24 24
25 /* Default is special, meaning 0.0.0.0. */ 25 /* Default is special, meaning 0.0.0.0. */
26 if (!strcmp(name, bb_str_default)) { 26 if (strcmp(name, "default") == 0) {
27 s_in->sin_addr.s_addr = INADDR_ANY; 27 s_in->sin_addr.s_addr = INADDR_ANY;
28 return 1; 28 return 1;
29 } 29 }
@@ -109,7 +109,7 @@ char* FAST_FUNC INET_rresolve(struct sockaddr_in *s_in, int numeric, uint32_t ne
109 if (ad == INADDR_ANY) { 109 if (ad == INADDR_ANY) {
110 if ((numeric & 0x0FFF) == 0) { 110 if ((numeric & 0x0FFF) == 0) {
111 if (numeric & 0x8000) 111 if (numeric & 0x8000)
112 return xstrdup(bb_str_default); 112 return xstrdup("default");
113 return xstrdup("*"); 113 return xstrdup("*");
114 } 114 }
115 } 115 }
@@ -205,7 +205,7 @@ char* FAST_FUNC INET6_rresolve(struct sockaddr_in6 *sin6, int numeric)
205 } 205 }
206 if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { 206 if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
207 if (numeric & 0x8000) 207 if (numeric & 0x8000)
208 return xstrdup(bb_str_default); 208 return xstrdup("default");
209 return xstrdup("*"); 209 return xstrdup("*");
210 } 210 }
211 211
diff --git a/libbb/messages.c b/libbb/messages.c
index 0c13449c0..3c3ec3519 100644
--- a/libbb/messages.c
+++ b/libbb/messages.c
@@ -24,8 +24,6 @@ const char bb_banner[] ALIGN1 = BANNER;
24 24
25const char bb_msg_memory_exhausted[] ALIGN1 = "memory exhausted"; 25const char bb_msg_memory_exhausted[] ALIGN1 = "memory exhausted";
26const char bb_msg_invalid_date[] ALIGN1 = "invalid date '%s'"; 26const char bb_msg_invalid_date[] ALIGN1 = "invalid date '%s'";
27const char bb_msg_write_error[] ALIGN1 = "write error";
28const char bb_msg_read_error[] ALIGN1 = "read error";
29const char bb_msg_unknown[] ALIGN1 = "(unknown)"; 27const char bb_msg_unknown[] ALIGN1 = "(unknown)";
30const char bb_msg_can_not_create_raw_socket[] ALIGN1 = "can't create raw socket"; 28const char bb_msg_can_not_create_raw_socket[] ALIGN1 = "can't create raw socket";
31const char bb_msg_perm_denied_are_you_root[] ALIGN1 = "permission denied (are you root?)"; 29const char bb_msg_perm_denied_are_you_root[] ALIGN1 = "permission denied (are you root?)";
@@ -35,18 +33,9 @@ const char bb_msg_invalid_arg[] ALIGN1 = "invalid argument '%s' to '%s'";
35const char bb_msg_standard_input[] ALIGN1 = "standard input"; 33const char bb_msg_standard_input[] ALIGN1 = "standard input";
36const char bb_msg_standard_output[] ALIGN1 = "standard output"; 34const char bb_msg_standard_output[] ALIGN1 = "standard output";
37 35
38const char bb_str_default[] ALIGN1 = "default";
39const char bb_hexdigits_upcase[] ALIGN1 = "0123456789ABCDEF"; 36const char bb_hexdigits_upcase[] ALIGN1 = "0123456789ABCDEF";
40 37
41const char bb_path_passwd_file[] ALIGN1 = "/etc/passwd"; 38#if !ENABLE_PLATFORM_MINGW32
42const char bb_path_shadow_file[] ALIGN1 = "/etc/shadow";
43const char bb_path_group_file[] ALIGN1 = "/etc/group";
44const char bb_path_gshadow_file[] ALIGN1 = "/etc/gshadow";
45const char bb_path_motd_file[] ALIGN1 = "/etc/motd";
46const char bb_dev_null[] ALIGN1 = "/dev/null";
47#if ENABLE_PLATFORM_MINGW32
48/* bb_busybox_exec_path is redefined to get_busybox_exec_path() in libbb.h */
49#else
50const char bb_busybox_exec_path[] ALIGN1 = CONFIG_BUSYBOX_EXEC_PATH; 39const char bb_busybox_exec_path[] ALIGN1 = CONFIG_BUSYBOX_EXEC_PATH;
51#endif 40#endif
52const char bb_default_login_shell[] ALIGN1 = LIBBB_DEFAULT_LOGIN_SHELL; 41const char bb_default_login_shell[] ALIGN1 = LIBBB_DEFAULT_LOGIN_SHELL;
diff --git a/libbb/mtab_file.c b/libbb/mtab_file.c
deleted file mode 100644
index add990ded..000000000
--- a/libbb/mtab_file.c
+++ /dev/null
@@ -1,15 +0,0 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
6 *
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */
9
10#include "libbb.h"
11
12/* Busybox mount uses either /proc/mounts or /etc/mtab to
13 * get the list of currently mounted filesystems */
14const char bb_path_mtab_file[] ALIGN1 =
15IF_FEATURE_MTAB_SUPPORT("/etc/mtab")IF_NOT_FEATURE_MTAB_SUPPORT("/proc/mounts");