[git commit] conspy: fix ESC key lost

Denys Vlasenko vda.linux at googlemail.com
Mon Apr 11 01:52:53 UTC 2011


commit: http://git.busybox.net/busybox/commit/?id=6161cdbb83bc35c20cf582bfce203f3e0632fbda
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Pascal Bellard <pascal.bellard at ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 miscutils/conspy.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/miscutils/conspy.c b/miscutils/conspy.c
index 9c54053..90ef91c 100644
--- a/miscutils/conspy.c
+++ b/miscutils/conspy.c
@@ -504,16 +504,17 @@ int conspy_main(int argc UNUSED_PARAM, char **argv)
 			}
 		}
 		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) {
-- 
1.7.3.4



More information about the busybox-cvs mailing list