Small bug fix to package/kernel/modules/other.mk stty broken in busybox 1.4.1, added...
[openwrt/staging/florian.git] / package / busybox / patches / 930-stty_bug_fix.patch
1 --- build_arm/busybox-1.4.1/coreutils/stty.c.old 2007-03-13 12:59:49.000000000 +0100
2 +++ build_arm/busybox-1.4.1/coreutils/stty.c 2007-03-13 07:51:38.000000000 +0100
3 @@ -568,10 +568,11 @@
4 NULL
5 };
6 int i = index_in_str_array(params, name);
7 - if (i) {
8 - if (!(i == 4 || i == 5))
9 - i |= 0x80;
10 - }
11 + if (i < 0)
12 + return 0;
13 + if (!(i == 4 || i == 5))
14 + i |= 0x80;
15 +
16 return i;
17 }
18
19 @@ -907,6 +908,7 @@
20 #define STTY_verbose_output (1<<2)
21 #define STTY_recoverable_output (1<<3)
22 #define STTY_noargs (1<<4)
23 +int stty_main(int argc, char **argv);
24 int stty_main(int argc, char **argv)
25 {
26 struct termios mode;