diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c index 66facee7166..29e9fafbca2 100644 --- a/dlls/ntdll/serial.c +++ b/dlls/ntdll/serial.c @@ -1111,6 +1111,7 @@ static inline NTSTATUS io_control(HANDLE hDevice, { case IOCTL_SERIAL_GET_TIMEOUTS: case IOCTL_SERIAL_SET_TIMEOUTS: + case IOCTL_SERIAL_GET_WAIT_MASK: case IOCTL_SERIAL_SET_WAIT_MASK: /* these are handled on the server side */ return STATUS_NOT_SUPPORTED; @@ -1195,15 +1196,6 @@ static inline NTSTATUS io_control(HANDLE hDevice, } else status = STATUS_INVALID_PARAMETER; break; - case IOCTL_SERIAL_GET_WAIT_MASK: - if (lpOutBuffer && nOutBufferSize == sizeof(DWORD)) - { - if (!(status = get_wait_mask(hDevice, lpOutBuffer, NULL, NULL, FALSE))) - sz = sizeof(DWORD); - } - else - status = STATUS_INVALID_PARAMETER; - break; case IOCTL_SERIAL_IMMEDIATE_CHAR: if (lpInBuffer && nInBufferSize == sizeof(CHAR)) status = xmit_immediate(hDevice, fd, lpInBuffer); diff --git a/server/serial.c b/server/serial.c index 8755543fa0b..8519473ac52 100644 --- a/server/serial.c +++ b/server/serial.c @@ -220,6 +220,13 @@ static obj_handle_t serial_ioctl( struct fd *fd, ioctl_code_t code, struct async else set_error( STATUS_BUFFER_TOO_SMALL ); return 0; + case IOCTL_SERIAL_GET_WAIT_MASK: + if (get_reply_max_size() >= sizeof(serial->eventmask)) + set_reply_data( &serial->eventmask, sizeof(serial->eventmask) ); + else + set_error( STATUS_BUFFER_TOO_SMALL ); + return 0; + case IOCTL_SERIAL_SET_WAIT_MASK: if (get_req_data_size() >= sizeof(serial->eventmask)) { diff --git a/server/trace.c b/server/trace.c index 4f62ee59bde..d830e4f9c18 100644 --- a/server/trace.c +++ b/server/trace.c @@ -120,6 +120,7 @@ static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code ) CASE(FSCTL_PIPE_PEEK); CASE(FSCTL_PIPE_WAIT); CASE(IOCTL_SERIAL_GET_TIMEOUTS); + CASE(IOCTL_SERIAL_GET_WAIT_MASK); CASE(IOCTL_SERIAL_SET_TIMEOUTS); CASE(IOCTL_SERIAL_SET_WAIT_MASK); CASE(WS_SIO_ADDRESS_LIST_CHANGE);