aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-11-23 03:39:45 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-11-23 03:39:45 +0000
commitff2b6d21853ca6417a43c06f37a32201f881245d (patch)
treee29af66c29c2a7cfeb7f7f4ca7c904704def2a5e /networking
parent6884f665bd7bc101f56ff9047afaffbc06dc99e2 (diff)
downloadbusybox-w32-ff2b6d21853ca6417a43c06f37a32201f881245d.tar.gz
busybox-w32-ff2b6d21853ca6417a43c06f37a32201f881245d.tar.bz2
busybox-w32-ff2b6d21853ca6417a43c06f37a32201f881245d.zip
logread: eliminate usage of data/bss
ifup: don't remove virtual iface prefixes (eth0:0) function old new delta shbuf 4 - -4 SMrup 6 - -6 SMrdn 12 - -12 static.label_buf 20 4 -16 get_var 158 140 -18 ------------------------------------------------------------------------------ (add/remove: 0/3 grow/shrink: 0/2 up/down: 0/-56) Total: -56 bytes text data bss dec hex filename 783501 962 9260 793723 c1c7b busybox_old 783483 942 9244 793669 c1c45 busybox_unstripped
Diffstat (limited to 'networking')
-rw-r--r--networking/ifupdown.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index c4d72524d..31911cd21 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -134,13 +134,15 @@ static char *get_var(const char *id, size_t idlen, struct interface_defn_t *ifd)
134 int i; 134 int i;
135 135
136 if (strncmpz(id, "iface", idlen) == 0) { 136 if (strncmpz(id, "iface", idlen) == 0) {
137 char *result; 137 static char *label_buf;
138 static char label_buf[20]; 138 //char *result;
139 safe_strncpy(label_buf, ifd->iface, sizeof(label_buf)); 139
140 result = strchr(label_buf, ':'); 140 free(label_buf);
141 if (result) { 141 label_buf = xstrdup(ifd->iface);
142 *result = '\0'; 142 // Remove virtual iface suffix - why?
143 } 143 // ubuntu's ifup doesn't do this
144 //result = strchrnul(label_buf, ':');
145 //*result = '\0';
144 return label_buf; 146 return label_buf;
145 } 147 }
146 if (strncmpz(id, "label", idlen) == 0) { 148 if (strncmpz(id, "label", idlen) == 0) {