#include <string.h>
#include <unistd.h>
-#include "libbb.h"
+#include "busybox.h"
#define MAX_OPT_DEPTH 10
#define EUNBALBRACK 10001
}
#endif
-#if ENABLE_FEATURE_IFUPDOWN_IPV4 || ENABLE_FEATURE_IFUPDOWN_IPV6 || \
- ENABLE_FEATURE_IFUPDOWN_IPX
+#if ENABLE_FEATURE_IFUPDOWN_IPV4 || ENABLE_FEATURE_IFUPDOWN_IPV6
static void addstr(char **buf, size_t *len, size_t *pos, char *str, size_t str_length)
{
if (*pos + str_length >= *len) {
varvalue = get_var(command, nextpercent - command, ifd);
if (varvalue) {
- addstr(&result, &len, &pos, varvalue, bb_strlen(varvalue));
+ addstr(&result, &len, &pos, varvalue, strlen(varvalue));
} else {
#ifdef CONFIG_FEATURE_IFUPDOWN_IP
/* Sigh... Add a special case for 'ip' to convert from
if (varvalue && (res=count_netmask_bits(varvalue)) > 0) {
char argument[255];
sprintf(argument, "%d", res);
- addstr(&result, &len, &pos, argument, bb_strlen(argument));
+ addstr(&result, &len, &pos, argument, strlen(argument));
command = nextpercent + 1;
break;
}
}
#endif
-#ifdef CONFIG_FEATURE_IFUPDOWN_IPX
-static int static_up_ipx(struct interface_defn_t *ifd, execfn *exec)
-{
- return(execute("ipx_interface add %iface% %frame% %netnum%", ifd, exec));
-}
-
-static int static_down_ipx(struct interface_defn_t *ifd, execfn *exec)
-{
- return(execute("ipx_interface del %iface% %frame%", ifd, exec));
-}
-
-static int dynamic_up(struct interface_defn_t *ifd, execfn *exec)
-{
- return(execute("ipx_interface add %iface% %frame%", ifd, exec));
-}
-
-static int dynamic_down(struct interface_defn_t *ifd, execfn *exec)
-{
- return(execute("ipx_interface del %iface% %frame%", ifd, exec));
-}
-
-static struct method_t methods_ipx[] = {
- { "dynamic", dynamic_up, dynamic_down, },
- { "static", static_up_ipx, static_down_ipx, },
-};
-
-static struct address_family_t addr_ipx = {
- "ipx",
- sizeof(methods_ipx) / sizeof(struct method_t),
- methods_ipx
-};
-#endif /* IFUP_FEATURE_IPX */
-
#ifdef CONFIG_FEATURE_IFUPDOWN_IPV6
static int loopback_up6(struct interface_defn_t *ifd, execfn *exec)
{
#endif
#ifdef CONFIG_FEATURE_IFUPDOWN_IPV6
&addr_inet6,
-#endif
-#ifdef CONFIG_FEATURE_IFUPDOWN_IPX
- &addr_ipx,
#endif
NULL
};
{
int i;
- if (bb_strlen(buf_ptr) == 0) {
+ if (strlen(buf_ptr) == 0) {
bb_error_msg("option with empty value \"%s\"", buf);
return NULL;
}
char *here;
char *there;
- result = xmalloc(bb_strlen(format) + bb_strlen(name) + bb_strlen(value) + 1);
+ result = xmalloc(strlen(format) + strlen(name) + strlen(value) + 1);
sprintf(result, format, name, value);
here++;
}
}
- memmove(here, there, bb_strlen(there) + 1);
+ memmove(here, there, strlen(there) + 1);
return result;
}
/* If we are able to read a line of output from the script,
* remove any trailing whitespace and use this value
* as the name of the logical interface. */
- char *pch = new_logical + bb_strlen(new_logical) - 1;
+ char *pch = new_logical + strlen(new_logical) - 1;
while (pch >= new_logical && isspace(*pch))
*(pch--) = '\0';
static llist_t *find_iface_state(llist_t *state_list, const char *iface)
{
- unsigned short iface_len = bb_strlen(iface);
+ unsigned short iface_len = strlen(iface);
llist_t *search = state_list;
while (search) {
llist_t *iface_state = find_iface_state(state_list, iface);
if (cmds == iface_up) {
- char *newiface = xmalloc(bb_strlen(iface) + 1 + bb_strlen(liface) + 1);
+ char *newiface = xmalloc(strlen(iface) + 1 + strlen(liface) + 1);
sprintf(newiface, "%s=%s", iface, liface);
if (iface_state == NULL) {
state_list = llist_add_to_end(state_list, newiface);