Jacek Caban : conhost: Remove no longer needed non-blocking IOCTL_CONDRV_READ_INPUT.

Alexandre Julliard julliard at winehq.org
Thu Oct 15 15:41:10 CDT 2020


Module: wine
Branch: master
Commit: 01c17ca26027d055c5e983c8d76d60647bf7f24d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=01c17ca26027d055c5e983c8d76d60647bf7f24d

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Oct 15 18:19:59 2020 +0200

conhost: Remove no longer needed non-blocking IOCTL_CONDRV_READ_INPUT.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernelbase/console.c  | 3 +--
 programs/conhost/conhost.c | 6 ++----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c
index 345241a44fd..2b3c6c3315a 100644
--- a/dlls/kernelbase/console.c
+++ b/dlls/kernelbase/console.c
@@ -1373,8 +1373,7 @@ BOOL WINAPI ReadConsoleInputA( HANDLE handle, INPUT_RECORD *buffer, DWORD length
  */
 BOOL WINAPI ReadConsoleInputW( HANDLE handle, INPUT_RECORD *buffer, DWORD length, DWORD *count )
 {
-    int blocking = 1;
-    if (!console_ioctl( handle, IOCTL_CONDRV_READ_INPUT, &blocking, sizeof(blocking),
+    if (!console_ioctl( handle, IOCTL_CONDRV_READ_INPUT, NULL, 0,
                         buffer, length * sizeof(*buffer), count ))
         return FALSE;
     *count /= sizeof(*buffer);
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c
index 8fb28e18ba9..3b4255ea310 100644
--- a/programs/conhost/conhost.c
+++ b/programs/conhost/conhost.c
@@ -2358,11 +2358,9 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code,
 
     case IOCTL_CONDRV_READ_INPUT:
         {
-            unsigned int blocking;
-            if (in_size && in_size != sizeof(blocking)) return STATUS_INVALID_PARAMETER;
+            if (in_size) return STATUS_INVALID_PARAMETER;
             ensure_tty_input_thread( console );
-            blocking = in_size && *(unsigned int *)in_data;
-            if (blocking && !console->record_count && *out_size)
+            if (!console->record_count && *out_size)
             {
                 TRACE( "pending read\n" );
                 console->read_ioctl = IOCTL_CONDRV_READ_INPUT;




More information about the wine-cvs mailing list