# HG changeset patch # User Pascal Bellard # Date 1299704514 -3600 # Node ID 9f5d4fc10fe0a01e66033305a3db930c9a6a0ea1 # Parent 71ebd2ab1b24a09356738a8ca0b62221006caab8 busybox: add conspy fix diff -r 71ebd2ab1b24 -r 9f5d4fc10fe0 busybox/receipt --- a/busybox/receipt Wed Mar 09 14:00:42 2011 +0000 +++ b/busybox/receipt Wed Mar 09 22:01:54 2011 +0100 @@ -28,6 +28,7 @@ zmodules.u printable.u cmdline.u +conspy.u EOT cp ../stuff/$PACKAGE-${VERSION%.*}.config .config } diff -r 71ebd2ab1b24 -r 9f5d4fc10fe0 busybox/stuff/busybox-1.18-conspy.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.18-conspy.u Wed Mar 09 22:01:54 2011 +0100 @@ -0,0 +1,23 @@ +Fix esc keys leak +--- busybox-1.18.0/miscutils/conspy.c ++++ busybox-1.18.0/miscutils/conspy.c +@@ -506,16 +506,17 @@ + } + } + poll_timeout_ms = 250; ++ if (option_mask32 & FLAG(v)) continue; + + // Insert all keys pressed into the virtual console's input + // buffer. Don't do this if the virtual console is in scan + // code mode - giving ASCII characters to a program expecting + // scan codes will confuse it. +- if (!(option_mask32 & FLAG(v)) && G.escape_count == 0) { ++ G.key_count += bytes_read; ++ if (G.escape_count == 0) { + int handle, result; + long kbd_mode; + +- G.key_count += bytes_read; + handle = xopen(tty_name, O_WRONLY); + result = ioctl(handle, KDGKBMODE, &kbd_mode); + if (result >= 0) {