external/busybox
Revision | 8be0c96053df4d61c1798c9a37241c7c4be5747c (tree) |
---|---|
Time | 2015-10-02 14:18:33 |
Author | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Merge remote-tracking branch 'cm/cm-12.1' into lollipop-x86
@@ -113,7 +113,7 @@ CONFIG_FEATURE_EDITING_FANCY_PROMPT=y | ||
113 | 113 | CONFIG_FEATURE_EDITING_ASK_TERMINAL=y |
114 | 114 | CONFIG_FEATURE_NON_POSIX_CP=y |
115 | 115 | # CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set |
116 | -CONFIG_FEATURE_COPYBUF_KB=4 | |
116 | +CONFIG_FEATURE_COPYBUF_KB=64 | |
117 | 117 | CONFIG_FEATURE_SKIP_ROOTFS=y |
118 | 118 | CONFIG_MONOTONIC_SYSCALL=y |
119 | 119 | CONFIG_IOCTL_HEX2STR_ERROR=y |
@@ -801,6 +801,7 @@ CONFIG_IP=y | ||
801 | 801 | CONFIG_FEATURE_IP_ADDRESS=y |
802 | 802 | CONFIG_FEATURE_IP_LINK=y |
803 | 803 | CONFIG_FEATURE_IP_ROUTE=y |
804 | +CONFIG_FEATURE_IP_ROUTE_DIR="/data/misc/net" | |
804 | 805 | # CONFIG_FEATURE_IP_TUNNEL is not set |
805 | 806 | CONFIG_FEATURE_IP_RULE=y |
806 | 807 | # CONFIG_FEATURE_IP_SHORT_FORMS is not set |
@@ -113,7 +113,7 @@ CONFIG_FEATURE_EDITING_FANCY_PROMPT=y | ||
113 | 113 | # CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set |
114 | 114 | CONFIG_FEATURE_NON_POSIX_CP=y |
115 | 115 | # CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set |
116 | -CONFIG_FEATURE_COPYBUF_KB=4 | |
116 | +CONFIG_FEATURE_COPYBUF_KB=64 | |
117 | 117 | CONFIG_FEATURE_SKIP_ROOTFS=y |
118 | 118 | CONFIG_MONOTONIC_SYSCALL=y |
119 | 119 | CONFIG_IOCTL_HEX2STR_ERROR=y |
@@ -534,6 +534,13 @@ config FEATURE_IP_ROUTE | ||
534 | 534 | help |
535 | 535 | Add support for routing table management to "ip". |
536 | 536 | |
537 | +config FEATURE_IP_ROUTE_DIR | |
538 | + string "ip route configuration directory" | |
539 | + default "/etc/iproute2" | |
540 | + depends on FEATURE_IP_ROUTE | |
541 | + help | |
542 | + Location of the "ip" applet routing configuration. | |
543 | + | |
537 | 544 | config FEATURE_IP_TUNNEL |
538 | 545 | bool "ip tunnel" |
539 | 546 | default y |
@@ -10,6 +10,8 @@ | ||
10 | 10 | #include "libbb.h" |
11 | 11 | #include "rt_names.h" |
12 | 12 | |
13 | +#define CONFDIR CONFIG_FEATURE_IP_ROUTE_DIR | |
14 | + | |
13 | 15 | typedef struct rtnl_tab_t { |
14 | 16 | const char *cached_str; |
15 | 17 | unsigned cached_result; |
@@ -85,7 +87,7 @@ static void rtnl_rtprot_initialize(void) | ||
85 | 87 | return; |
86 | 88 | rtnl_rtprot_tab = xzalloc(sizeof(*rtnl_rtprot_tab)); |
87 | 89 | memcpy(rtnl_rtprot_tab->tab, init_tab, sizeof(init_tab)); |
88 | - rtnl_tab_initialize("/etc/iproute2/rt_protos", rtnl_rtprot_tab->tab); | |
90 | + rtnl_tab_initialize(CONFDIR "/rt_protos", rtnl_rtprot_tab->tab); | |
89 | 91 | } |
90 | 92 | |
91 | 93 | const char* FAST_FUNC rtnl_rtprot_n2a(int id, char *buf) |
@@ -123,7 +125,7 @@ static void rtnl_rtscope_initialize(void) | ||
123 | 125 | rtnl_rtscope_tab->tab[254] = "host"; |
124 | 126 | rtnl_rtscope_tab->tab[253] = "link"; |
125 | 127 | rtnl_rtscope_tab->tab[200] = "site"; |
126 | - rtnl_tab_initialize("/etc/iproute2/rt_scopes", rtnl_rtscope_tab->tab); | |
128 | + rtnl_tab_initialize(CONFDIR "/rt_scopes", rtnl_rtscope_tab->tab); | |
127 | 129 | } |
128 | 130 | |
129 | 131 | const char* FAST_FUNC rtnl_rtscope_n2a(int id, char *buf) |
@@ -156,7 +158,7 @@ static void rtnl_rtrealm_initialize(void) | ||
156 | 158 | if (rtnl_rtrealm_tab) return; |
157 | 159 | rtnl_rtrealm_tab = xzalloc(sizeof(*rtnl_rtrealm_tab)); |
158 | 160 | rtnl_rtrealm_tab->tab[0] = "unknown"; |
159 | - rtnl_tab_initialize("/etc/iproute2/rt_realms", rtnl_rtrealm_tab->tab); | |
161 | + rtnl_tab_initialize(CONFDIR "/rt_realms", rtnl_rtrealm_tab->tab); | |
160 | 162 | } |
161 | 163 | |
162 | 164 | int FAST_FUNC rtnl_rtrealm_a2n(uint32_t *id, char *arg) |
@@ -191,7 +193,7 @@ static void rtnl_rtdsfield_initialize(void) | ||
191 | 193 | if (rtnl_rtdsfield_tab) return; |
192 | 194 | rtnl_rtdsfield_tab = xzalloc(sizeof(*rtnl_rtdsfield_tab)); |
193 | 195 | rtnl_rtdsfield_tab->tab[0] = "0"; |
194 | - rtnl_tab_initialize("/etc/iproute2/rt_dsfield", rtnl_rtdsfield_tab->tab); | |
196 | + rtnl_tab_initialize(CONFDIR "/rt_dsfield", rtnl_rtdsfield_tab->tab); | |
195 | 197 | } |
196 | 198 | |
197 | 199 | const char* FAST_FUNC rtnl_dsfield_n2a(int id, char *buf) |
@@ -228,7 +230,7 @@ static void rtnl_rttable_initialize(void) | ||
228 | 230 | rtnl_rttable_tab->tab[255] = "local"; |
229 | 231 | rtnl_rttable_tab->tab[254] = "main"; |
230 | 232 | rtnl_rttable_tab->tab[253] = "default"; |
231 | - rtnl_tab_initialize("/etc/iproute2/rt_tables", rtnl_rttable_tab->tab); | |
233 | + rtnl_tab_initialize(CONFDIR "/rt_tables", rtnl_rttable_tab->tab); | |
232 | 234 | } |
233 | 235 | |
234 | 236 | const char* FAST_FUNC rtnl_rttable_n2a(int id, char *buf) |