Commit e77873da authored by Alexandre Julliard's avatar Alexandre Julliard

server: Implement IOCTL_SERIAL_GET_WAIT_MASK as an ioctl on the server side.

parent b7b9c4ea
......@@ -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);
......
......@@ -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))
{
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment