diff options
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r-- | networking/ifupdown.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index bd0021ab4..c34e2b955 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * ifupdown for busybox | 3 | * ifupdown for busybox |
4 | * Copyright (c) 2002 Glenn McGrath <bug1@optushome.com.au> | 4 | * Copyright (c) 2002 Glenn McGrath <bug1@optushome.com.au> |
5 | * Copyright (c) 2003 Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (c) 2003-2004 Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * Based on ifupdown v 0.6.4 by Anthony Towns | 7 | * Based on ifupdown v 0.6.4 by Anthony Towns |
8 | * Copyright (c) 1999 Anthony Towns <aj@azure.humbug.org.au> | 8 | * Copyright (c) 1999 Anthony Towns <aj@azure.humbug.org.au> |
@@ -56,7 +56,7 @@ | |||
56 | #if 0 | 56 | #if 0 |
57 | #define debug_noise(fmt, args...) printf(fmt, ## args) | 57 | #define debug_noise(fmt, args...) printf(fmt, ## args) |
58 | #else | 58 | #else |
59 | #define debug_noise(fmt, args...) | 59 | #define debug_noise(fmt, args...) |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | /* Forward declaration */ | 62 | /* Forward declaration */ |
@@ -72,7 +72,7 @@ extern llist_t *llist_add_to_end(llist_t *list_head, char *data) | |||
72 | new_item = xmalloc(sizeof(llist_t)); | 72 | new_item = xmalloc(sizeof(llist_t)); |
73 | new_item->data = data; | 73 | new_item->data = data; |
74 | new_item->link = NULL; | 74 | new_item->link = NULL; |
75 | 75 | ||
76 | prev = NULL; | 76 | prev = NULL; |
77 | tmp = list_head; | 77 | tmp = list_head; |
78 | while(tmp) { | 78 | while(tmp) { |
@@ -80,7 +80,7 @@ extern llist_t *llist_add_to_end(llist_t *list_head, char *data) | |||
80 | tmp = tmp->link; | 80 | tmp = tmp->link; |
81 | } | 81 | } |
82 | if (prev) { | 82 | if (prev) { |
83 | prev->link = new_item; | 83 | prev->link = new_item; |
84 | } else { | 84 | } else { |
85 | list_head = new_item; | 85 | list_head = new_item; |
86 | } | 86 | } |
@@ -123,7 +123,7 @@ struct variable_t | |||
123 | char *value; | 123 | char *value; |
124 | }; | 124 | }; |
125 | 125 | ||
126 | struct interface_defn_t | 126 | struct interface_defn_t |
127 | { | 127 | { |
128 | struct interface_defn_t *prev; | 128 | struct interface_defn_t *prev; |
129 | struct interface_defn_t *next; | 129 | struct interface_defn_t *next; |
@@ -598,7 +598,7 @@ static int wvdial_down(struct interface_defn_t *ifd, execfn *exec) | |||
598 | "-p /var/run/wvdial.%iface% -s 2", ifd, exec)); | 598 | "-p /var/run/wvdial.%iface% -s 2", ifd, exec)); |
599 | } | 599 | } |
600 | 600 | ||
601 | static struct method_t methods[] = | 601 | static struct method_t methods[] = |
602 | { | 602 | { |
603 | { "wvdial", wvdial_up, wvdial_down, }, | 603 | { "wvdial", wvdial_up, wvdial_down, }, |
604 | { "ppp", ppp_up, ppp_down, }, | 604 | { "ppp", ppp_up, ppp_down, }, |
@@ -608,7 +608,7 @@ static struct method_t methods[] = | |||
608 | { "loopback", loopback_up, loopback_down, }, | 608 | { "loopback", loopback_up, loopback_down, }, |
609 | }; | 609 | }; |
610 | 610 | ||
611 | struct address_family_t addr_inet = | 611 | struct address_family_t addr_inet = |
612 | { | 612 | { |
613 | "inet", | 613 | "inet", |
614 | sizeof(methods) / sizeof(struct method_t), | 614 | sizeof(methods) / sizeof(struct method_t), |
@@ -885,7 +885,7 @@ static struct interfaces_file_t *read_interfaces(char *filename) | |||
885 | perror(filename); | 885 | perror(filename); |
886 | return NULL; | 886 | return NULL; |
887 | } | 887 | } |
888 | debug_noise("\t%s=%s\n", currif->option[currif->n_options].name, | 888 | debug_noise("\t%s=%s\n", currif->option[currif->n_options].name, |
889 | currif->option[currif->n_options].value); | 889 | currif->option[currif->n_options].value); |
890 | currif->n_options++; | 890 | currif->n_options++; |
891 | break; | 891 | break; |
@@ -1031,7 +1031,7 @@ static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *o | |||
1031 | } | 1031 | } |
1032 | } | 1032 | } |
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | bb_xasprintf(&buf, "run-parts /etc/network/if-%s.d", opt); | 1035 | bb_xasprintf(&buf, "run-parts /etc/network/if-%s.d", opt); |
1036 | (*exec)(buf); | 1036 | (*exec)(buf); |
1037 | 1037 | ||
@@ -1211,7 +1211,7 @@ extern int ifupdown_main(int argc, char **argv) | |||
1211 | #ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING | 1211 | #ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING |
1212 | while ((i = getopt(argc, argv, "i:hvnamf")) != -1) | 1212 | while ((i = getopt(argc, argv, "i:hvnamf")) != -1) |
1213 | #else | 1213 | #else |
1214 | while ((i = getopt(argc, argv, "i:hvnaf")) != -1) | 1214 | while ((i = getopt(argc, argv, "i:hvnaf")) != -1) |
1215 | #endif | 1215 | #endif |
1216 | { | 1216 | { |
1217 | switch (i) { | 1217 | switch (i) { |
@@ -1249,7 +1249,7 @@ extern int ifupdown_main(int argc, char **argv) | |||
1249 | if (!do_all) { | 1249 | if (!do_all) { |
1250 | bb_show_usage(); | 1250 | bb_show_usage(); |
1251 | } | 1251 | } |
1252 | } | 1252 | } |
1253 | 1253 | ||
1254 | debug_noise("reading %s file:\n", interfaces); | 1254 | debug_noise("reading %s file:\n", interfaces); |
1255 | defn = read_interfaces(interfaces); | 1255 | defn = read_interfaces(interfaces); |
@@ -1297,8 +1297,8 @@ extern int ifupdown_main(int argc, char **argv) | |||
1297 | list = list->link; | 1297 | list = list->link; |
1298 | } | 1298 | } |
1299 | target_list = defn->autointerfaces; | 1299 | target_list = defn->autointerfaces; |
1300 | #endif | 1300 | #endif |
1301 | } | 1301 | } |
1302 | } else { | 1302 | } else { |
1303 | target_list = llist_add_to_end(target_list, argv[optind]); | 1303 | target_list = llist_add_to_end(target_list, argv[optind]); |
1304 | } | 1304 | } |
@@ -1413,7 +1413,7 @@ extern int ifupdown_main(int argc, char **argv) | |||
1413 | } else { | 1413 | } else { |
1414 | iface_state->data = NULL; | 1414 | iface_state->data = NULL; |
1415 | iface_state->link = NULL; | 1415 | iface_state->link = NULL; |
1416 | } | 1416 | } |
1417 | } | 1417 | } |
1418 | } | 1418 | } |
1419 | } | 1419 | } |