diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-06-05 20:20:25 -0500 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-06-05 20:20:25 -0500 |
commit | 33c22f43a52aae722ce4d9cbe47f8d2fff31f395 (patch) | |
tree | 71f9661d9a843cca28225852f8784e48a2b96cb2 /testing/net-tools/net-tools-1.60-nameif.patch | |
parent | c87732e5659b56943ef4f120d7c71dcaabc3f849 (diff) | |
parent | 3695b5d62c2aef6e82abc95d775a2ebd89bce081 (diff) |
Merge branch 'master' of vparabola:~/abslibre-pre-mips64el
Conflicts:
multilib-testing/lib32-mesa/PKGBUILD
multilib/lib32-glew/PKGBUILD
testing/iproute2/PKGBUILD
Diffstat (limited to 'testing/net-tools/net-tools-1.60-nameif.patch')
-rw-r--r-- | testing/net-tools/net-tools-1.60-nameif.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/net-tools/net-tools-1.60-nameif.patch b/testing/net-tools/net-tools-1.60-nameif.patch new file mode 100644 index 000000000..54def00c2 --- /dev/null +++ b/testing/net-tools/net-tools-1.60-nameif.patch @@ -0,0 +1,58 @@ +--- net-tools-1.60/nameif.c.nameif 2000-10-18 19:26:29.000000000 +0200 ++++ net-tools-1.60/nameif.c 2003-03-19 11:02:01.000000000 +0100 +@@ -117,7 +117,8 @@ + } + + struct change { +- struct change *next,**pprev; ++ struct change *next; ++ int found; + char ifname[IFNAMSIZ+1]; + unsigned char mac[6]; + }; +@@ -139,10 +140,7 @@ + ch->ifname, pos); + if (parsemac(p,ch->mac) < 0) + complain(_("cannot parse MAC `%s' at %s"), p, pos); +- if (clist) +- clist->pprev = &ch->next; + ch->next = clist; +- ch->pprev = &clist; + clist = ch; + return 0; + } +@@ -200,7 +198,7 @@ + + void usage(void) + { +- fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}")); ++ fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}\n")); + exit(1); + } + +@@ -277,21 +275,21 @@ + ch = lookupmac(mac); + if (!ch) + continue; +- +- *ch->pprev = ch->next; ++ ++ ch->found = 1; + if (strcmp(p, ch->ifname)) { + if (setname(p, ch->ifname) < 0) + complain(_("cannot change name of %s to %s: %s"), + p, ch->ifname, strerror(errno)); + } +- free(ch); + } + fclose(ifh); + + while (clist) { + struct change *ch = clist; + clist = clist->next; +- warning(_("interface '%s' not found"), ch->ifname); ++ if (!ch->found) ++ warning(_("interface '%s' not found"), ch->ifname); + free(ch); + } + |