Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b7b9c4ea
Commit
b7b9c4ea
authored
May 05, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Implement IOCTL_SERIAL_SET_WAIT_MASK as an ioctl on the server side.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
84e97cf6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
37 deletions
+14
-37
serial.c
dlls/ntdll/serial.c
+1
-22
server_protocol.h
include/wine/server_protocol.h
+2
-3
protocol.def
server/protocol.def
+0
-2
request.h
server/request.h
+0
-1
serial.c
server/serial.c
+10
-8
trace.c
server/trace.c
+1
-1
No files found.
dlls/ntdll/serial.c
View file @
b7b9c4ea
...
...
@@ -771,21 +771,6 @@ static NTSTATUS set_special_chars(int fd, const SERIAL_CHARS* sc)
return
STATUS_SUCCESS
;
}
static
NTSTATUS
set_wait_mask
(
HANDLE
hDevice
,
DWORD
mask
)
{
NTSTATUS
status
;
SERVER_START_REQ
(
set_serial_info
)
{
req
->
handle
=
wine_server_obj_handle
(
hDevice
);
req
->
flags
=
SERIALINFO_SET_MASK
;
req
->
eventmask
=
mask
;
status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
return
status
;
}
/*
* does not change IXOFF but simulates that IXOFF has been received:
*/
...
...
@@ -1126,6 +1111,7 @@ static inline NTSTATUS io_control(HANDLE hDevice,
{
case
IOCTL_SERIAL_GET_TIMEOUTS
:
case
IOCTL_SERIAL_SET_TIMEOUTS
:
case
IOCTL_SERIAL_SET_WAIT_MASK
:
/* these are handled on the server side */
return
STATUS_NOT_SUPPORTED
;
}
...
...
@@ -1301,13 +1287,6 @@ static inline NTSTATUS io_control(HANDLE hDevice,
status
=
STATUS_NOT_SUPPORTED
;
#endif
break
;
case
IOCTL_SERIAL_SET_WAIT_MASK
:
if
(
lpInBuffer
&&
nInBufferSize
==
sizeof
(
DWORD
))
{
status
=
set_wait_mask
(
hDevice
,
*
(
DWORD
*
)
lpInBuffer
);
}
else
status
=
STATUS_INVALID_PARAMETER
;
break
;
case
IOCTL_SERIAL_SET_XOFF
:
status
=
set_XOff
(
fd
);
break
;
...
...
include/wine/server_protocol.h
View file @
b7b9c4ea
...
...
@@ -3164,13 +3164,12 @@ struct set_serial_info_request
struct
request_header
__header
;
obj_handle_t
handle
;
int
flags
;
unsigned
int
eventmask
;
char
__pad_20
[
4
]
;
};
struct
set_serial_info_reply
{
struct
reply_header
__header
;
};
#define SERIALINFO_SET_MASK 0x02
#define SERIALINFO_PENDING_WRITE 0x04
#define SERIALINFO_PENDING_WAIT 0x08
...
...
@@ -6396,6 +6395,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 5
29
#define SERVER_PROTOCOL_VERSION 5
30
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
b7b9c4ea
...
...
@@ -2309,9 +2309,7 @@ enum message_type
@REQ(set_serial_info)
obj_handle_t handle; /* handle to comm port */
int flags; /* bitmask to set values (see below) */
unsigned int eventmask;
@END
#define SERIALINFO_SET_MASK 0x02
#define SERIALINFO_PENDING_WRITE 0x04
#define SERIALINFO_PENDING_WAIT 0x08
...
...
server/request.h
View file @
b7b9c4ea
...
...
@@ -1559,7 +1559,6 @@ C_ASSERT( FIELD_OFFSET(struct get_serial_info_reply, pending_write) == 16 );
C_ASSERT
(
sizeof
(
struct
get_serial_info_reply
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_serial_info_request
,
handle
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_serial_info_request
,
flags
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_serial_info_request
,
eventmask
)
==
20
);
C_ASSERT
(
sizeof
(
struct
set_serial_info_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
register_async_request
,
type
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
register_async_request
,
async
)
==
16
);
...
...
server/serial.c
View file @
b7b9c4ea
...
...
@@ -220,6 +220,16 @@ 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_SET_WAIT_MASK
:
if
(
get_req_data_size
()
>=
sizeof
(
serial
->
eventmask
))
{
serial
->
eventmask
=
*
(
unsigned
int
*
)
get_req_data
();
serial
->
generation
++
;
fd_async_wake_up
(
serial
->
fd
,
ASYNC_TYPE_WAIT
,
STATUS_SUCCESS
);
}
else
set_error
(
STATUS_BUFFER_TOO_SMALL
);
return
0
;
default:
set_error
(
STATUS_NOT_SUPPORTED
);
return
0
;
...
...
@@ -329,14 +339,6 @@ DECL_HANDLER(set_serial_info)
if
(
req
->
flags
&
SERIALINFO_PENDING_WRITE
)
serial
->
pending_write
=
1
;
/* event mask */
if
(
req
->
flags
&
SERIALINFO_SET_MASK
)
{
serial
->
eventmask
=
req
->
eventmask
;
serial
->
generation
++
;
fd_async_wake_up
(
serial
->
fd
,
ASYNC_TYPE_WAIT
,
STATUS_SUCCESS
);
}
release_object
(
serial
);
}
}
server/trace.c
View file @
b7b9c4ea
...
...
@@ -121,6 +121,7 @@ static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
CASE
(
FSCTL_PIPE_WAIT
);
CASE
(
IOCTL_SERIAL_GET_TIMEOUTS
);
CASE
(
IOCTL_SERIAL_SET_TIMEOUTS
);
CASE
(
IOCTL_SERIAL_SET_WAIT_MASK
);
CASE
(
WS_SIO_ADDRESS_LIST_CHANGE
);
default:
fprintf
(
stderr
,
"%s%08x"
,
prefix
,
*
code
);
break
;
#undef CASE
...
...
@@ -2843,7 +2844,6 @@ static void dump_set_serial_info_request( const struct set_serial_info_request *
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
fprintf
(
stderr
,
", flags=%d"
,
req
->
flags
);
fprintf
(
stderr
,
", eventmask=%08x"
,
req
->
eventmask
);
}
static
void
dump_register_async_request
(
const
struct
register_async_request
*
req
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment