remove ipkg from busybox
[openwrt.git] / package / busybox / patches / 250-ash_export-n.patch
1 --- a/shell/ash.c
2 +++ b/shell/ash.c
3 @@ -11875,8 +11875,17 @@
4 const char *p;
5 char **aptr;
6 int flag = argv[0][0] == 'r'? VREADONLY : VEXPORT;
7 + int mask = ~0;
8 + int nopt;
9 + while ((nopt = nextopt("np"))) {
10 + if (nopt == 'n') {
11 + mask = ~flag;
12 + } else { /* p */
13 + break;
14 + }
15 + }
16
17 - if (nextopt("p") != 'p') {
18 + if (nopt != 'p') {
19 aptr = argptr;
20 name = *aptr;
21 if (name) {
22 @@ -11888,10 +11897,12 @@
23 vp = *findvar(hashvar(name), name);
24 if (vp) {
25 vp->flags |= flag;
26 + vp->flags &= mask;
27 continue;
28 }
29 }
30 setvar(name, p, flag);
31 + setvar(name, p, flag & mask);
32 } while ((name = *++aptr) != NULL);
33 return 0;
34 }
This page took 0.049327 seconds and 5 git commands to generate.