use generic inittab for x86
[openwrt.git] / package / busybox / patches / 250-ash_export-n.patch
1 --- busybox.old/shell/ash.c 2006-11-22 12:02:03.000000000 -0800
2 +++ busybox.dev/shell/ash.c 2006-11-22 11:05:32.000000000 -0800
3 @@ -12257,9 +12257,18 @@
4 const char *p;
5 char **aptr;
6 int flag = argv[0][0] == 'r'? VREADONLY : VEXPORT;
7 + int mask = ~0;
8 int notp;
9
10 - notp = nextopt("p") - 'p';
11 + while ((notp = nextopt("np"))) {
12 + if (notp == 'n') {
13 + mask = ~flag;
14 + } else { /* p */
15 + break;
16 + }
17 + }
18 +
19 + notp -= 'p';
20 if (notp && ((name = *(aptr = argptr)))) {
21 do {
22 if ((p = strchr(name, '=')) != NULL) {
23 @@ -12267,10 +12276,11 @@
24 } else {
25 if ((vp = *findvar(hashvar(name), name))) {
26 vp->flags |= flag;
27 + vp->flags &= mask;
28 continue;
29 }
30 }
31 - setvar(name, p, flag);
32 + setvar(name, p, flag & mask);
33 } while ((name = *++aptr) != NULL);
34 } else {
35 showvars(argv[0], flag, 0);
This page took 0.040856 seconds and 5 git commands to generate.