prevent madwifi from building on UML
[openwrt.git] / package / busybox / patches / 250-ash_export-n.patch
1 Index: busybox-1.4.2/shell/ash.c
2 ===================================================================
3 --- busybox-1.4.2.orig/shell/ash.c 2007-06-04 13:21:32.248074216 +0200
4 +++ busybox-1.4.2/shell/ash.c 2007-06-04 13:21:34.000807760 +0200
5 @@ -12237,9 +12237,18 @@
6 const char *p;
7 char **aptr;
8 int flag = argv[0][0] == 'r'? VREADONLY : VEXPORT;
9 + int mask = ~0;
10 int notp;
11
12 - notp = nextopt("p") - 'p';
13 + while ((notp = nextopt("np"))) {
14 + if (notp == 'n') {
15 + mask = ~flag;
16 + } else { /* p */
17 + break;
18 + }
19 + }
20 +
21 + notp -= 'p';
22 if (notp && ((name = *(aptr = argptr)))) {
23 do {
24 if ((p = strchr(name, '=')) != NULL) {
25 @@ -12247,10 +12256,11 @@
26 } else {
27 if ((vp = *findvar(hashvar(name), name))) {
28 vp->flags |= flag;
29 + vp->flags &= mask;
30 continue;
31 }
32 }
33 - setvar(name, p, flag);
34 + setvar(name, p, flag & mask);
35 } while ((name = *++aptr) != NULL);
36 } else {
37 showvars(argv[0], flag, 0);
This page took 0.038454 seconds and 5 git commands to generate.