Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
82e8fd97
Commit
82e8fd97
authored
Sep 01, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use IOCTL_CONDRV_CTRL_EVENT in GenerateConsoleCtrlEvent.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f9c89932
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
61 deletions
+10
-61
console.c
dlls/kernel32/tests/console.c
+4
-0
console.c
dlls/kernelbase/console.c
+5
-9
server_protocol.h
include/wine/server_protocol.h
+1
-18
console.c
server/console.c
+0
-13
protocol.def
server/protocol.def
+0
-7
request.h
server/request.h
+0
-5
trace.c
server/trace.c
+0
-9
No files found.
dlls/kernel32/tests/console.c
View file @
82e8fd97
...
...
@@ -3670,6 +3670,10 @@ static void test_FreeConsole(void)
ok
(
!
hwnd
,
"hwnd = %p
\n
"
,
hwnd
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"last error %u
\n
"
,
GetLastError
());
ret
=
GenerateConsoleCtrlEvent
(
CTRL_C_EVENT
,
0
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"GenerateConsoleCtrlEvent returned %x(%u)
\n
"
,
ret
,
GetLastError
());
SetStdHandle
(
STD_INPUT_HANDLE
,
(
HANDLE
)
0xdeadbeef
);
handle
=
GetConsoleInputWaitHandle
();
ok
(
handle
==
(
HANDLE
)
0xdeadbeef
,
"GetConsoleInputWaitHandle returned %p
\n
"
,
handle
);
...
...
dlls/kernelbase/console.c
View file @
82e8fd97
...
...
@@ -593,7 +593,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH FreeConsole(void)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
GenerateConsoleCtrlEvent
(
DWORD
event
,
DWORD
group
)
{
BOOL
re
t
;
struct
condrv_ctrl_event
ctrl_even
t
;
TRACE
(
"(%d, %x)
\n
"
,
event
,
group
);
...
...
@@ -603,14 +603,10 @@ BOOL WINAPI DECLSPEC_HOTPATCH GenerateConsoleCtrlEvent( DWORD event, DWORD group
return
FALSE
;
}
SERVER_START_REQ
(
send_console_signal
)
{
req
->
signal
=
event
;
req
->
group_id
=
group
;
ret
=
!
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
return
ret
;
ctrl_event
.
event
=
event
;
ctrl_event
.
group_id
=
group
;
return
console_ioctl
(
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
,
IOCTL_CONDRV_CTRL_EVENT
,
&
ctrl_event
,
sizeof
(
ctrl_event
),
NULL
,
0
,
NULL
);
}
...
...
include/wine/server_protocol.h
View file @
82e8fd97
...
...
@@ -1924,20 +1924,6 @@ struct create_console_output_reply
struct
send_console_signal_request
{
struct
request_header
__header
;
int
signal
;
process_id_t
group_id
;
char
__pad_20
[
4
];
};
struct
send_console_signal_reply
{
struct
reply_header
__header
;
};
struct
get_next_console_request_request
{
struct
request_header
__header
;
...
...
@@ -5541,7 +5527,6 @@ enum request
REQ_append_console_input_history
,
REQ_get_console_input_history
,
REQ_create_console_output
,
REQ_send_console_signal
,
REQ_get_next_console_request
,
REQ_read_directory_changes
,
REQ_read_change
,
...
...
@@ -5831,7 +5816,6 @@ union generic_request
struct
append_console_input_history_request
append_console_input_history_request
;
struct
get_console_input_history_request
get_console_input_history_request
;
struct
create_console_output_request
create_console_output_request
;
struct
send_console_signal_request
send_console_signal_request
;
struct
get_next_console_request_request
get_next_console_request_request
;
struct
read_directory_changes_request
read_directory_changes_request
;
struct
read_change_request
read_change_request
;
...
...
@@ -6119,7 +6103,6 @@ union generic_reply
struct
append_console_input_history_reply
append_console_input_history_reply
;
struct
get_console_input_history_reply
get_console_input_history_reply
;
struct
create_console_output_reply
create_console_output_reply
;
struct
send_console_signal_reply
send_console_signal_reply
;
struct
get_next_console_request_reply
get_next_console_request_reply
;
struct
read_directory_changes_reply
read_directory_changes_reply
;
struct
read_change_reply
read_change_reply
;
...
...
@@ -6337,7 +6320,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 64
0
#define SERVER_PROTOCOL_VERSION 64
1
/* ### protocol_version end ### */
...
...
server/console.c
View file @
82e8fd97
...
...
@@ -2394,19 +2394,6 @@ DECL_HANDLER(create_console_output)
release_object
(
console
);
}
/* sends a signal to a console (process, group...) */
DECL_HANDLER
(
send_console_signal
)
{
process_id_t
group
;
group
=
req
->
group_id
?
req
->
group_id
:
current
->
process
->
group_id
;
if
(
!
group
)
set_error
(
STATUS_INVALID_PARAMETER
);
else
propagate_console_signal
(
current
->
process
->
console
,
req
->
signal
,
group
);
}
/* get console which renderer is 'current' */
static
int
cgwe_enum
(
struct
process
*
process
,
void
*
user
)
{
...
...
server/protocol.def
View file @
82e8fd97
...
...
@@ -1515,13 +1515,6 @@ enum server_fd_type
@END
/* Sends a signal to a process group */
@REQ(send_console_signal)
int signal; /* the signal to send */
process_id_t group_id; /* the group to send the signal to */
@END
/* Retrieve the next pending console ioctl request */
@REQ(get_next_console_request)
obj_handle_t handle; /* console server handle */
...
...
server/request.h
View file @
82e8fd97
...
...
@@ -188,7 +188,6 @@ DECL_HANDLER(get_console_wait_event);
DECL_HANDLER
(
append_console_input_history
);
DECL_HANDLER
(
get_console_input_history
);
DECL_HANDLER
(
create_console_output
);
DECL_HANDLER
(
send_console_signal
);
DECL_HANDLER
(
get_next_console_request
);
DECL_HANDLER
(
read_directory_changes
);
DECL_HANDLER
(
read_change
);
...
...
@@ -477,7 +476,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_append_console_input_history
,
(
req_handler
)
req_get_console_input_history
,
(
req_handler
)
req_create_console_output
,
(
req_handler
)
req_send_console_signal
,
(
req_handler
)
req_get_next_console_request
,
(
req_handler
)
req_read_directory_changes
,
(
req_handler
)
req_read_change
,
...
...
@@ -1131,9 +1129,6 @@ C_ASSERT( FIELD_OFFSET(struct create_console_output_request, fd) == 28 );
C_ASSERT
(
sizeof
(
struct
create_console_output_request
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_console_output_reply
,
handle_out
)
==
8
);
C_ASSERT
(
sizeof
(
struct
create_console_output_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
send_console_signal_request
,
signal
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
send_console_signal_request
,
group_id
)
==
16
);
C_ASSERT
(
sizeof
(
struct
send_console_signal_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_next_console_request_request
,
handle
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_next_console_request_request
,
signal
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_next_console_request_request
,
read
)
==
20
);
...
...
server/trace.c
View file @
82e8fd97
...
...
@@ -2089,12 +2089,6 @@ static void dump_create_console_output_reply( const struct create_console_output
fprintf
(
stderr
,
" handle_out=%04x"
,
req
->
handle_out
);
}
static
void
dump_send_console_signal_request
(
const
struct
send_console_signal_request
*
req
)
{
fprintf
(
stderr
,
" signal=%d"
,
req
->
signal
);
fprintf
(
stderr
,
", group_id=%04x"
,
req
->
group_id
);
}
static
void
dump_get_next_console_request_request
(
const
struct
get_next_console_request_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
...
...
@@ -4502,7 +4496,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_append_console_input_history_request
,
(
dump_func
)
dump_get_console_input_history_request
,
(
dump_func
)
dump_create_console_output_request
,
(
dump_func
)
dump_send_console_signal_request
,
(
dump_func
)
dump_get_next_console_request_request
,
(
dump_func
)
dump_read_directory_changes_request
,
(
dump_func
)
dump_read_change_request
,
...
...
@@ -4788,7 +4781,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
NULL
,
(
dump_func
)
dump_get_console_input_history_reply
,
(
dump_func
)
dump_create_console_output_reply
,
NULL
,
(
dump_func
)
dump_get_next_console_request_reply
,
NULL
,
(
dump_func
)
dump_read_change_reply
,
...
...
@@ -5074,7 +5066,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"append_console_input_history"
,
"get_console_input_history"
,
"create_console_output"
,
"send_console_signal"
,
"get_next_console_request"
,
"read_directory_changes"
,
"read_change"
,
...
...
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