Jacek Caban : server: Remove no longer needed open_console request.

Alexandre Julliard julliard at winehq.org
Wed Jul 29 15:47:00 CDT 2020


Module: wine
Branch: master
Commit: 305da71c7d8098bf2d2a07584a25be2e5fcc2b91
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=305da71c7d8098bf2d2a07584a25be2e5fcc2b91

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Jul 29 12:38:28 2020 +0200

server: Remove no longer needed open_console request.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/wine/server_protocol.h | 23 +----------------------
 server/console.c               | 22 ----------------------
 server/protocol.def            | 11 -----------
 server/request.h               |  9 ---------
 server/trace.c                 | 16 ----------------
 5 files changed, 1 insertion(+), 80 deletions(-)

diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index d4bb5c9ab3..7753d24877 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -1850,24 +1850,6 @@ struct free_console_reply
 
 
 
-struct open_console_request
-{
-    struct request_header __header;
-    obj_handle_t from;
-    unsigned int access;
-    unsigned int attributes;
-    int          share;
-    char __pad_28[4];
-};
-struct open_console_reply
-{
-    struct reply_header __header;
-    obj_handle_t handle;
-    char __pad_12[4];
-};
-
-
-
 struct attach_console_request
 {
     struct request_header __header;
@@ -5572,7 +5554,6 @@ enum request
     REQ_set_socket_deferred,
     REQ_alloc_console,
     REQ_free_console,
-    REQ_open_console,
     REQ_attach_console,
     REQ_get_console_wait_event,
     REQ_set_console_input_info,
@@ -5863,7 +5844,6 @@ union generic_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 open_console_request open_console_request;
     struct attach_console_request attach_console_request;
     struct get_console_wait_event_request get_console_wait_event_request;
     struct set_console_input_info_request set_console_input_info_request;
@@ -6152,7 +6132,6 @@ union generic_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 open_console_reply open_console_reply;
     struct attach_console_reply attach_console_reply;
     struct get_console_wait_event_reply get_console_wait_event_reply;
     struct set_console_input_info_reply set_console_input_info_reply;
@@ -6376,7 +6355,7 @@ union generic_reply
 
 /* ### protocol_version begin ### */
 
-#define SERVER_PROTOCOL_VERSION 632
+#define SERVER_PROTOCOL_VERSION 633
 
 /* ### protocol_version end ### */
 
diff --git a/server/console.c b/server/console.c
index 46d43e7832..0060f7cb65 100644
--- a/server/console.c
+++ b/server/console.c
@@ -2091,28 +2091,6 @@ DECL_HANDLER(free_console)
     free_console( current->process );
 }
 
-/* open a handle to the process console */
-DECL_HANDLER(open_console)
-{
-    struct object      *obj = NULL;
-
-    if ((obj = get_handle_obj( current->process, req->from,
-                               FILE_READ_PROPERTIES|FILE_WRITE_PROPERTIES, &console_input_ops )))
-    {
-        struct console_input *console = (struct console_input *)obj;
-        obj = (console->active) ? grab_object( console->active ) : NULL;
-        release_object( console );
-    }
-
-    /* FIXME: req->share is not used (as in screen buffer creation)  */
-    if (obj)
-    {
-        reply->handle = alloc_handle( current->process, obj, req->access, req->attributes );
-        release_object( obj );
-    }
-    else if (!get_error()) set_error( STATUS_ACCESS_DENIED );
-}
-
 /* attach to a other process's console */
 DECL_HANDLER(attach_console)
 {
diff --git a/server/protocol.def b/server/protocol.def
index b48cf70e48..c2773307a4 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1472,17 +1472,6 @@ enum server_fd_type
 @END
 
 
-/* Open a handle to the process console */
- at REQ(open_console)
-    obj_handle_t from;          /* console_in handle to get active screen buffer */
-    unsigned int access;        /* wanted access rights */
-    unsigned int attributes;    /* object attributes */
-    int          share;         /* share mask (only for output handles) */
- at REPLY
-    obj_handle_t handle;        /* handle to the console */
- at END
-
-
 /* Attach to a other process's console */
 @REQ(attach_console)
     process_id_t pid;           /* pid of attached console process */
diff --git a/server/request.h b/server/request.h
index fd5141d6cb..190581332b 100644
--- a/server/request.h
+++ b/server/request.h
@@ -183,7 +183,6 @@ DECL_HANDLER(enable_socket_event);
 DECL_HANDLER(set_socket_deferred);
 DECL_HANDLER(alloc_console);
 DECL_HANDLER(free_console);
-DECL_HANDLER(open_console);
 DECL_HANDLER(attach_console);
 DECL_HANDLER(get_console_wait_event);
 DECL_HANDLER(set_console_input_info);
@@ -473,7 +472,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
     (req_handler)req_set_socket_deferred,
     (req_handler)req_alloc_console,
     (req_handler)req_free_console,
-    (req_handler)req_open_console,
     (req_handler)req_attach_console,
     (req_handler)req_get_console_wait_event,
     (req_handler)req_set_console_input_info,
@@ -1112,13 +1110,6 @@ C_ASSERT( sizeof(struct alloc_console_request) == 32 );
 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 open_console_request, from) == 12 );
-C_ASSERT( FIELD_OFFSET(struct open_console_request, access) == 16 );
-C_ASSERT( FIELD_OFFSET(struct open_console_request, attributes) == 20 );
-C_ASSERT( FIELD_OFFSET(struct open_console_request, share) == 24 );
-C_ASSERT( sizeof(struct open_console_request) == 32 );
-C_ASSERT( FIELD_OFFSET(struct open_console_reply, handle) == 8 );
-C_ASSERT( sizeof(struct open_console_reply) == 16 );
 C_ASSERT( FIELD_OFFSET(struct attach_console_request, pid) == 12 );
 C_ASSERT( sizeof(struct attach_console_request) == 16 );
 C_ASSERT( FIELD_OFFSET(struct attach_console_reply, std_in) == 8 );
diff --git a/server/trace.c b/server/trace.c
index db5d0dd6ea..15a769fb59 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -2041,19 +2041,6 @@ static void dump_free_console_request( const struct free_console_request *req )
 {
 }
 
-static void dump_open_console_request( const struct open_console_request *req )
-{
-    fprintf( stderr, " from=%04x", req->from );
-    fprintf( stderr, ", access=%08x", req->access );
-    fprintf( stderr, ", attributes=%08x", req->attributes );
-    fprintf( stderr, ", share=%d", req->share );
-}
-
-static void dump_open_console_reply( const struct open_console_reply *req )
-{
-    fprintf( stderr, " handle=%04x", req->handle );
-}
-
 static void dump_attach_console_request( const struct attach_console_request *req )
 {
     fprintf( stderr, " pid=%04x", req->pid );
@@ -4520,7 +4507,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
     (dump_func)dump_set_socket_deferred_request,
     (dump_func)dump_alloc_console_request,
     (dump_func)dump_free_console_request,
-    (dump_func)dump_open_console_request,
     (dump_func)dump_attach_console_request,
     (dump_func)dump_get_console_wait_event_request,
     (dump_func)dump_set_console_input_info_request,
@@ -4807,7 +4793,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
     NULL,
     (dump_func)dump_alloc_console_reply,
     NULL,
-    (dump_func)dump_open_console_reply,
     (dump_func)dump_attach_console_reply,
     (dump_func)dump_get_console_wait_event_reply,
     NULL,
@@ -5094,7 +5079,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
     "set_socket_deferred",
     "alloc_console",
     "free_console",
-    "open_console",
     "attach_console",
     "get_console_wait_event",
     "set_console_input_info",




More information about the wine-cvs mailing list