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
dc6f6e9e
Commit
dc6f6e9e
authored
Oct 13, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Remove no longer used console requests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1b672d10
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
380 deletions
+1
-380
server_protocol.h
include/wine/server_protocol.h
+1
-91
console.c
server/console.c
+0
-153
protocol.def
server/protocol.def
+0
-42
request.h
server/request.h
+0
-31
trace.c
server/trace.c
+0
-63
No files found.
include/wine/server_protocol.h
View file @
dc6f6e9e
...
...
@@ -1773,33 +1773,6 @@ struct set_socket_deferred_reply
};
struct
alloc_console_request
{
struct
request_header
__header
;
unsigned
int
access
;
unsigned
int
attributes
;
process_id_t
pid
;
};
struct
alloc_console_reply
{
struct
reply_header
__header
;
obj_handle_t
handle_in
;
char
__pad_12
[
4
];
};
struct
free_console_request
{
struct
request_header
__header
;
char
__pad_12
[
4
];
};
struct
free_console_reply
{
struct
reply_header
__header
;
};
struct
get_console_wait_event_request
{
...
...
@@ -1815,54 +1788,6 @@ struct get_console_wait_event_reply
struct
append_console_input_history_request
{
struct
request_header
__header
;
obj_handle_t
handle
;
/* VARARG(line,unicode_str); */
};
struct
append_console_input_history_reply
{
struct
reply_header
__header
;
};
struct
get_console_input_history_request
{
struct
request_header
__header
;
obj_handle_t
handle
;
int
index
;
char
__pad_20
[
4
];
};
struct
get_console_input_history_reply
{
struct
reply_header
__header
;
int
total
;
/* VARARG(line,unicode_str); */
char
__pad_12
[
4
];
};
struct
create_console_output_request
{
struct
request_header
__header
;
obj_handle_t
handle_in
;
unsigned
int
access
;
unsigned
int
attributes
;
unsigned
int
share
;
char
__pad_28
[
4
];
};
struct
create_console_output_reply
{
struct
reply_header
__header
;
obj_handle_t
handle_out
;
char
__pad_12
[
4
];
};
struct
get_next_console_request_request
{
struct
request_header
__header
;
...
...
@@ -5472,12 +5397,7 @@ enum request
REQ_get_socket_info
,
REQ_enable_socket_event
,
REQ_set_socket_deferred
,
REQ_alloc_console
,
REQ_free_console
,
REQ_get_console_wait_event
,
REQ_append_console_input_history
,
REQ_get_console_input_history
,
REQ_create_console_output
,
REQ_get_next_console_request
,
REQ_read_directory_changes
,
REQ_read_change
,
...
...
@@ -5758,12 +5678,7 @@ union generic_request
struct
get_socket_info_request
get_socket_info_request
;
struct
enable_socket_event_request
enable_socket_event_request
;
struct
set_socket_deferred_request
set_socket_deferred_request
;
struct
alloc_console_request
alloc_console_request
;
struct
free_console_request
free_console_request
;
struct
get_console_wait_event_request
get_console_wait_event_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
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
;
...
...
@@ -6042,12 +5957,7 @@ union generic_reply
struct
get_socket_info_reply
get_socket_info_reply
;
struct
enable_socket_event_reply
enable_socket_event_reply
;
struct
set_socket_deferred_reply
set_socket_deferred_reply
;
struct
alloc_console_reply
alloc_console_reply
;
struct
free_console_reply
free_console_reply
;
struct
get_console_wait_event_reply
get_console_wait_event_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
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
;
...
...
@@ -6266,7 +6176,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 6
49
#define SERVER_PROTOCOL_VERSION 6
50
/* ### protocol_version end ### */
...
...
server/console.c
View file @
dc6f6e9e
...
...
@@ -846,22 +846,6 @@ struct thread *console_get_renderer( struct console_input *console )
return
console
->
renderer
;
}
static
struct
console_input
*
console_input_get
(
obj_handle_t
handle
,
unsigned
access
)
{
struct
console_input
*
console
=
NULL
;
if
(
handle
)
console
=
(
struct
console_input
*
)
get_handle_obj
(
current
->
process
,
handle
,
access
,
&
console_input_ops
);
else
if
(
current
->
process
->
console
)
{
console
=
(
struct
console_input
*
)
grab_object
(
current
->
process
->
console
);
}
if
(
!
console
&&
!
get_error
())
set_error
(
STATUS_INVALID_PARAMETER
);
return
console
;
}
struct
console_signal_info
{
struct
console_input
*
console
;
...
...
@@ -1241,57 +1225,6 @@ static int set_output_info( struct screen_buffer *screen_buffer,
return
1
;
}
/* appends a new line to history (history is a fixed size array) */
static
void
console_input_append_hist
(
struct
console_input
*
console
,
const
WCHAR
*
buf
,
data_size_t
len
)
{
struct
history_line
*
ptr
;
if
(
!
console
||
!
console
->
history_size
)
{
set_error
(
STATUS_INVALID_PARAMETER
);
/* FIXME */
return
;
}
len
=
(
len
/
sizeof
(
WCHAR
))
*
sizeof
(
WCHAR
);
if
(
console
->
history_mode
&&
console
->
history_index
&&
console
->
history
[
console
->
history_index
-
1
]
->
len
==
len
&&
!
memcmp
(
console
->
history
[
console
->
history_index
-
1
]
->
text
,
buf
,
len
))
{
/* don't duplicate entry */
set_error
(
STATUS_ALIAS_EXISTS
);
return
;
}
if
(
!
(
ptr
=
mem_alloc
(
offsetof
(
struct
history_line
,
text
[
len
/
sizeof
(
WCHAR
)]
))))
return
;
ptr
->
len
=
len
;
memcpy
(
ptr
->
text
,
buf
,
len
);
if
(
console
->
history_index
<
console
->
history_size
)
{
console
->
history
[
console
->
history_index
++
]
=
ptr
;
}
else
{
free
(
console
->
history
[
0
])
;
memmove
(
&
console
->
history
[
0
],
&
console
->
history
[
1
],
(
console
->
history_size
-
1
)
*
sizeof
(
*
console
->
history
)
);
console
->
history
[
console
->
history_size
-
1
]
=
ptr
;
}
}
/* returns a line from the cache */
static
data_size_t
console_input_get_hist
(
struct
console_input
*
console
,
int
index
)
{
data_size_t
ret
=
0
;
if
(
index
>=
console
->
history_index
)
set_error
(
STATUS_INVALID_PARAMETER
);
else
{
ret
=
console
->
history
[
index
]
->
len
;
set_reply_data
(
console
->
history
[
index
]
->
text
,
min
(
ret
,
get_reply_max_size
()
));
}
return
ret
;
}
/* dumb dump */
static
void
console_input_dump
(
struct
object
*
obj
,
int
verbose
)
{
...
...
@@ -2542,92 +2475,6 @@ struct object *create_console_device( struct object *root, const struct unicode_
return
create_named_object
(
root
,
&
console_device_ops
,
name
,
attr
,
sd
);
}
/* allocate a console for the renderer */
DECL_HANDLER
(
alloc_console
)
{
struct
process
*
process
;
struct
console_input
*
console
;
int
attach
=
0
;
switch
(
req
->
pid
)
{
case
0
:
/* console to be attached to parent process */
if
(
!
(
process
=
get_process_from_id
(
current
->
process
->
parent_id
)))
{
set_error
(
STATUS_ACCESS_DENIED
);
return
;
}
attach
=
1
;
break
;
default
:
/* console to be attached to req->pid */
if
(
!
(
process
=
get_process_from_id
(
req
->
pid
)))
return
;
}
if
(
attach
&&
process
->
console
)
{
set_error
(
STATUS_ACCESS_DENIED
);
}
else
if
((
console
=
(
struct
console_input
*
)
create_console_input
()))
{
if
((
reply
->
handle_in
=
alloc_handle
(
current
->
process
,
console
,
req
->
access
,
req
->
attributes
))
&&
attach
)
{
process
->
console
=
(
struct
console_input
*
)
grab_object
(
console
);
console
->
num_proc
++
;
}
release_object
(
console
);
}
release_object
(
process
);
}
/* free the console of the current process */
DECL_HANDLER
(
free_console
)
{
free_console
(
current
->
process
);
}
/* appends a string to console's history */
DECL_HANDLER
(
append_console_input_history
)
{
struct
console_input
*
console
;
if
(
!
(
console
=
console_input_get
(
req
->
handle
,
FILE_WRITE_PROPERTIES
)))
return
;
console_input_append_hist
(
console
,
get_req_data
(),
get_req_data_size
()
);
release_object
(
console
);
}
/* appends a string to console's history */
DECL_HANDLER
(
get_console_input_history
)
{
struct
console_input
*
console
;
if
(
!
(
console
=
console_input_get
(
req
->
handle
,
FILE_READ_PROPERTIES
)))
return
;
reply
->
total
=
console_input_get_hist
(
console
,
req
->
index
);
release_object
(
console
);
}
/* creates a screen buffer */
DECL_HANDLER
(
create_console_output
)
{
struct
console_input
*
console
;
struct
object
*
screen_buffer
;
if
(
!
(
console
=
console_input_get
(
req
->
handle_in
,
FILE_WRITE_PROPERTIES
)))
return
;
screen_buffer
=
create_console_output
(
console
);
if
(
screen_buffer
)
{
/* FIXME: should store sharing and test it when opening the CONOUT$ device
* see file.c on how this could be done */
reply
->
handle_out
=
alloc_handle
(
current
->
process
,
screen_buffer
,
req
->
access
,
req
->
attributes
);
release_object
(
screen_buffer
);
}
release_object
(
console
);
}
/* get console which renderer is 'current' */
static
int
cgwe_enum
(
struct
process
*
process
,
void
*
user
)
{
...
...
server/protocol.def
View file @
dc6f6e9e
...
...
@@ -1429,20 +1429,6 @@ enum server_fd_type
obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
@END
/* Allocate a console (only used by a console renderer) */
@REQ(alloc_console)
unsigned int access; /* wanted access rights */
unsigned int attributes; /* object attributes */
process_id_t pid; /* pid of process which shall be attached to the console */
@REPLY
obj_handle_t handle_in; /* handle to console input */
@END
/* Free the console of the current process */
@REQ(free_console)
@END
/* Get the input queue wait event */
@REQ(get_console_wait_event)
...
...
@@ -1452,34 +1438,6 @@ enum server_fd_type
@END
/* appends a string to console's history */
@REQ(append_console_input_history)
obj_handle_t handle; /* handle to console input, or 0 for process' console */
VARARG(line,unicode_str); /* line to add */
@END
/* appends a string to console's history */
@REQ(get_console_input_history)
obj_handle_t handle; /* handle to console input, or 0 for process' console */
int index; /* index to get line from */
@REPLY
int total; /* total length of line in Unicode chars */
VARARG(line,unicode_str); /* line to add */
@END
/* creates a new screen buffer on process' console */
@REQ(create_console_output)
obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
unsigned int access; /* wanted access rights */
unsigned int attributes; /* object attributes */
unsigned int share; /* sharing credentials */
@REPLY
obj_handle_t handle_out; /* handle to the screen buffer */
@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 @
dc6f6e9e
...
...
@@ -178,12 +178,7 @@ DECL_HANDLER(get_socket_event);
DECL_HANDLER
(
get_socket_info
);
DECL_HANDLER
(
enable_socket_event
);
DECL_HANDLER
(
set_socket_deferred
);
DECL_HANDLER
(
alloc_console
);
DECL_HANDLER
(
free_console
);
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
(
get_next_console_request
);
DECL_HANDLER
(
read_directory_changes
);
DECL_HANDLER
(
read_change
);
...
...
@@ -463,12 +458,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_get_socket_info
,
(
req_handler
)
req_enable_socket_event
,
(
req_handler
)
req_set_socket_deferred
,
(
req_handler
)
req_alloc_console
,
(
req_handler
)
req_free_console
,
(
req_handler
)
req_get_console_wait_event
,
(
req_handler
)
req_append_console_input_history
,
(
req_handler
)
req_get_console_input_history
,
(
req_handler
)
req_create_console_output
,
(
req_handler
)
req_get_next_console_request
,
(
req_handler
)
req_read_directory_changes
,
(
req_handler
)
req_read_change
,
...
...
@@ -1078,31 +1068,10 @@ C_ASSERT( sizeof(struct enable_socket_event_request) == 32 );
C_ASSERT
(
FIELD_OFFSET
(
struct
set_socket_deferred_request
,
handle
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_socket_deferred_request
,
deferred
)
==
16
);
C_ASSERT
(
sizeof
(
struct
set_socket_deferred_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
alloc_console_request
,
access
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
alloc_console_request
,
attributes
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
alloc_console_request
,
pid
)
==
20
);
C_ASSERT
(
sizeof
(
struct
alloc_console_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
alloc_console_reply
,
handle_in
)
==
8
);
C_ASSERT
(
sizeof
(
struct
alloc_console_reply
)
==
16
);
C_ASSERT
(
sizeof
(
struct
free_console_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_wait_event_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
get_console_wait_event_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_wait_event_reply
,
event
)
==
8
);
C_ASSERT
(
sizeof
(
struct
get_console_wait_event_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
append_console_input_history_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
append_console_input_history_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_input_history_request
,
handle
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_input_history_request
,
index
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_console_input_history_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_input_history_reply
,
total
)
==
8
);
C_ASSERT
(
sizeof
(
struct
get_console_input_history_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_console_output_request
,
handle_in
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_console_output_request
,
access
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_console_output_request
,
attributes
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_console_output_request
,
share
)
==
24
);
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
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 @
dc6f6e9e
...
...
@@ -1998,22 +1998,6 @@ static void dump_set_socket_deferred_request( const struct set_socket_deferred_r
fprintf
(
stderr
,
", deferred=%04x"
,
req
->
deferred
);
}
static
void
dump_alloc_console_request
(
const
struct
alloc_console_request
*
req
)
{
fprintf
(
stderr
,
" access=%08x"
,
req
->
access
);
fprintf
(
stderr
,
", attributes=%08x"
,
req
->
attributes
);
fprintf
(
stderr
,
", pid=%04x"
,
req
->
pid
);
}
static
void
dump_alloc_console_reply
(
const
struct
alloc_console_reply
*
req
)
{
fprintf
(
stderr
,
" handle_in=%04x"
,
req
->
handle_in
);
}
static
void
dump_free_console_request
(
const
struct
free_console_request
*
req
)
{
}
static
void
dump_get_console_wait_event_request
(
const
struct
get_console_wait_event_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
...
...
@@ -2024,37 +2008,6 @@ static void dump_get_console_wait_event_reply( const struct get_console_wait_eve
fprintf
(
stderr
,
" event=%04x"
,
req
->
event
);
}
static
void
dump_append_console_input_history_request
(
const
struct
append_console_input_history_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
dump_varargs_unicode_str
(
", line="
,
cur_size
);
}
static
void
dump_get_console_input_history_request
(
const
struct
get_console_input_history_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
fprintf
(
stderr
,
", index=%d"
,
req
->
index
);
}
static
void
dump_get_console_input_history_reply
(
const
struct
get_console_input_history_reply
*
req
)
{
fprintf
(
stderr
,
" total=%d"
,
req
->
total
);
dump_varargs_unicode_str
(
", line="
,
cur_size
);
}
static
void
dump_create_console_output_request
(
const
struct
create_console_output_request
*
req
)
{
fprintf
(
stderr
,
" handle_in=%04x"
,
req
->
handle_in
);
fprintf
(
stderr
,
", access=%08x"
,
req
->
access
);
fprintf
(
stderr
,
", attributes=%08x"
,
req
->
attributes
);
fprintf
(
stderr
,
", share=%08x"
,
req
->
share
);
}
static
void
dump_create_console_output_reply
(
const
struct
create_console_output_reply
*
req
)
{
fprintf
(
stderr
,
" handle_out=%04x"
,
req
->
handle_out
);
}
static
void
dump_get_next_console_request_request
(
const
struct
get_next_console_request_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
...
...
@@ -4466,12 +4419,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_get_socket_info_request
,
(
dump_func
)
dump_enable_socket_event_request
,
(
dump_func
)
dump_set_socket_deferred_request
,
(
dump_func
)
dump_alloc_console_request
,
(
dump_func
)
dump_free_console_request
,
(
dump_func
)
dump_get_console_wait_event_request
,
(
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_get_next_console_request_request
,
(
dump_func
)
dump_read_directory_changes_request
,
(
dump_func
)
dump_read_change_request
,
...
...
@@ -4748,12 +4696,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_get_socket_info_reply
,
NULL
,
NULL
,
(
dump_func
)
dump_alloc_console_reply
,
NULL
,
(
dump_func
)
dump_get_console_wait_event_reply
,
NULL
,
(
dump_func
)
dump_get_console_input_history_reply
,
(
dump_func
)
dump_create_console_output_reply
,
(
dump_func
)
dump_get_next_console_request_reply
,
NULL
,
(
dump_func
)
dump_read_change_reply
,
...
...
@@ -5030,12 +4973,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"get_socket_info"
,
"enable_socket_event"
,
"set_socket_deferred"
,
"alloc_console"
,
"free_console"
,
"get_console_wait_event"
,
"append_console_input_history"
,
"get_console_input_history"
,
"create_console_output"
,
"get_next_console_request"
,
"read_directory_changes"
,
"read_change"
,
...
...
@@ -5263,7 +5201,6 @@ static const struct
{
"ACCESS_VIOLATION"
,
STATUS_ACCESS_VIOLATION
},
{
"ADDRESS_ALREADY_ASSOCIATED"
,
STATUS_ADDRESS_ALREADY_ASSOCIATED
},
{
"ALERTED"
,
STATUS_ALERTED
},
{
"ALIAS_EXISTS"
,
STATUS_ALIAS_EXISTS
},
{
"BAD_DEVICE_TYPE"
,
STATUS_BAD_DEVICE_TYPE
},
{
"BAD_IMPERSONATION_LEVEL"
,
STATUS_BAD_IMPERSONATION_LEVEL
},
{
"BUFFER_OVERFLOW"
,
STATUS_BUFFER_OVERFLOW
},
...
...
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