aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-11-17 21:48:11 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-11-17 21:48:11 +0000
commit29d801b834b908bde20984a5fd9a782f04da7e1a (patch)
tree6fe0d8f3f85b968c5a184e0a148669ca96eafcfd
parentfd73b8c2ce6ae9517e37127cba2a48a6ee803287 (diff)
downloadbusybox-29d801b834b908bde20984a5fd9a782f04da7e1a.tar.gz
Remove mapping option, its should always be used
-rw-r--r--networking/config.in1
-rw-r--r--networking/ifupdown.c20
2 files changed, 0 insertions, 21 deletions
diff --git a/networking/config.in b/networking/config.in
index 27a8ab571..d62a6e425 100644
--- a/networking/config.in
+++ b/networking/config.in
@@ -21,7 +21,6 @@ if [ "$CONFIG_IFUPDOWN" = "y" ]; then
bool ' Enable support for IPv4' CONFIG_FEATURE_IFUPDOWN_IPV4
bool ' Enable support for IPv6 (requires ip command)' CONFIG_FEATURE_IFUPDOWN_IPV6
bool ' Enable support for IPX (requires ipx_interface command)' CONFIG_FEATURE_IFUPDOWN_IPX
- bool ' Mapping support' CONFIG_FEATURE_IFUPDOWN_MAPPING
fi
bool 'ip' CONFIG_IP
if [ "$CONFIG_IP" = "y" ]; then
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index b2dbb0d22..03eb0a5a7 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -58,7 +58,6 @@ typedef struct address_family {
method *method;
} address_family;
-#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING
typedef struct mapping_defn {
struct mapping_defn *next;
@@ -72,7 +71,6 @@ typedef struct mapping_defn {
int n_mappings;
char **mapping;
} mapping_defn;
-#endif
typedef struct variable {
char *name;
@@ -99,9 +97,7 @@ typedef struct interfaces_file {
char **autointerfaces;
interface_defn *ifaces;
-#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING
mapping_defn *mappings;
-#endif
} interfaces_file;
#define MAX_OPT_DEPTH 10
@@ -684,9 +680,7 @@ static interfaces_file *read_interfaces(char *filename)
{
interface_defn *currif = NULL;
interfaces_file *defn;
-#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING
mapping_defn *currmap = NULL;
-#endif
FILE *f;
char firstword[80];
char *buf = NULL;
@@ -699,9 +693,7 @@ static interfaces_file *read_interfaces(char *filename)
defn = xmalloc(sizeof(interfaces_file));
defn->max_autointerfaces = defn->n_autointerfaces = 0;
defn->autointerfaces = NULL;
-#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING
defn->mappings = NULL;
-#endif
defn->ifaces = NULL;
f = fopen(filename, "r");
if (f == NULL) {
@@ -716,7 +708,6 @@ static interfaces_file *read_interfaces(char *filename)
}
if (strcmp(firstword, "mapping") == 0) {
-#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING
currmap = xmalloc(sizeof(mapping_defn));
currmap->max_matches = 0;
currmap->n_matches = 0;
@@ -743,7 +734,6 @@ static interfaces_file *read_interfaces(char *filename)
currmap->next = NULL;
}
currently_processing = MAPPING;
-#endif
} else if (strcmp(firstword, "iface") == 0) {
{
char iface_name[80];
@@ -881,7 +871,6 @@ static interfaces_file *read_interfaces(char *filename)
currif->n_options++;
break;
case MAPPING:
-#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING
if (strcmp(firstword, "script") == 0) {
if (currmap->script != NULL) {
error_msg("%s:%d: duplicate script in mapping", filename, line);
@@ -900,7 +889,6 @@ static interfaces_file *read_interfaces(char *filename)
error_msg("%s:%d: misplaced option", filename, line);
return NULL;
}
-#endif
break;
case NONE:
default:
@@ -1076,7 +1064,6 @@ static int iface_down(interface_defn *iface)
return (1);
}
-#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING
static int popen2(FILE **in, FILE **out, char *command, ...)
{
va_list ap;
@@ -1158,7 +1145,6 @@ static int run_mapping(char *physical, char *logical, int len, mapping_defn * ma
return 1;
}
-#endif /* CONFIG_FEATURE_IFUPDOWN_MAPPING */
static int lookfor_iface(char **ifaces, int n_ifaces, char *iface)
@@ -1197,9 +1183,7 @@ extern int ifupdown_main(int argc, char **argv)
char *statefile = "/etc/network/ifstate";
int do_all = 0;
-#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING
int run_mappings = 1;
-#endif
int force = 0;
int n_target_ifaces = 0;
int n_state = 0;
@@ -1228,11 +1212,9 @@ extern int ifupdown_main(int argc, char **argv)
case 'n': /* no-act */
no_act = 1;
break;
-#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING
case 'm': /* no-mappings */
run_mappings = 0;
break;
-#endif
case 'f': /* force */
force = 1;
break;
@@ -1356,7 +1338,6 @@ extern int ifupdown_main(int argc, char **argv)
liface[79] = 0;
}
}
-#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING
if ((cmds == iface_up) && run_mappings) {
mapping_defn *currmap;
@@ -1373,7 +1354,6 @@ extern int ifupdown_main(int argc, char **argv)
}
}
}
-#endif
for (currif = defn->ifaces; currif; currif = currif->next) {
if (strcmp(liface, currif->iface) == 0) {