wok rev 9195

busybox: add conspy fix
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Mar 09 22:01:54 2011 +0100 (2011-03-09)
parents 71ebd2ab1b24
children 0dedd19314fb
files busybox/receipt busybox/stuff/busybox-1.18-conspy.u
line diff
     1.1 --- a/busybox/receipt	Wed Mar 09 14:00:42 2011 +0000
     1.2 +++ b/busybox/receipt	Wed Mar 09 22:01:54 2011 +0100
     1.3 @@ -28,6 +28,7 @@
     1.4  zmodules.u
     1.5  printable.u
     1.6  cmdline.u
     1.7 +conspy.u
     1.8  EOT
     1.9      cp ../stuff/$PACKAGE-${VERSION%.*}.config .config
    1.10  }
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/busybox/stuff/busybox-1.18-conspy.u	Wed Mar 09 22:01:54 2011 +0100
     2.3 @@ -0,0 +1,23 @@
     2.4 +Fix esc keys leak
     2.5 +--- busybox-1.18.0/miscutils/conspy.c
     2.6 ++++ busybox-1.18.0/miscutils/conspy.c
     2.7 +@@ -506,16 +506,17 @@
     2.8 + 			}
     2.9 + 		}
    2.10 + 		poll_timeout_ms = 250;
    2.11 ++		if (option_mask32 & FLAG(v)) continue;
    2.12 + 
    2.13 + 		// Insert all keys pressed into the virtual console's input
    2.14 + 		// buffer.  Don't do this if the virtual console is in scan
    2.15 + 		// code mode - giving ASCII characters to a program expecting
    2.16 + 		// scan codes will confuse it.
    2.17 +-		if (!(option_mask32 & FLAG(v)) && G.escape_count == 0) {
    2.18 ++		G.key_count += bytes_read;
    2.19 ++		if (G.escape_count == 0) {
    2.20 + 			int handle, result;
    2.21 + 			long kbd_mode;
    2.22 + 
    2.23 +-			G.key_count += bytes_read;
    2.24 + 			handle = xopen(tty_name, O_WRONLY);
    2.25 + 			result = ioctl(handle, KDGKBMODE, &kbd_mode);
    2.26 + 			if (result >= 0) {