Alexandre Julliard : server: Get rid of the unused file parameter in exec_process.

Alexandre Julliard julliard at winehq.org
Mon Nov 11 16:20:22 CST 2019


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Nov 11 20:02:36 2019 +0100

server: Get rid of the unused file parameter in exec_process.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/process.c        | 10 ++++------
 include/wine/server_protocol.h |  4 ++--
 server/protocol.def            |  1 -
 server/request.h               |  3 +--
 server/trace.c                 |  1 -
 5 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index b539737ead..76a33f7161 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -1430,8 +1430,7 @@ static NTSTATUS alloc_object_attributes( const SECURITY_ATTRIBUTES *attr, struct
  *
  * Replace the existing process by exec'ing a new one.
  */
-static BOOL replace_process( HANDLE handle, const RTL_USER_PROCESS_PARAMETERS *params,
-                             const pe_image_info_t *pe_info )
+static BOOL replace_process( const RTL_USER_PROCESS_PARAMETERS *params, const pe_image_info_t *pe_info )
 {
     NTSTATUS status;
     int socketfd[2];
@@ -1454,7 +1453,6 @@ static BOOL replace_process( HANDLE handle, const RTL_USER_PROCESS_PARAMETERS *p
     SERVER_START_REQ( exec_process )
     {
         req->socket_fd      = socketfd[1];
-        req->exe_file       = wine_server_obj_handle( handle );
         req->cpu            = pe_info->cpu;
         status = wine_server_call( req );
     }
@@ -2124,11 +2122,11 @@ static void exec_process( LPCWSTR name )
                debugstr_w(name), is_64bit_arch(pe_info.cpu) ? 64 : 32,
                wine_dbgstr_longlong(pe_info.base), wine_dbgstr_longlong(pe_info.base + pe_info.map_size),
                cpu_names[pe_info.cpu] );
-        replace_process( hFile, params, &pe_info );
+        replace_process( params, &pe_info );
         break;
     case BINARY_UNIX_LIB:
         TRACE( "%s is a Unix library, starting as Winelib app\n", debugstr_w(name) );
-        replace_process( hFile, params, &pe_info );
+        replace_process( params, &pe_info );
         break;
     case BINARY_UNKNOWN:
         /* check for .com or .pif extension */
@@ -2138,7 +2136,7 @@ static void exec_process( LPCWSTR name )
     case BINARY_WIN16:
         TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(name) );
         if (!(new_params = get_vdm_params( params, &pe_info ))) break;
-        replace_process( 0, new_params, &pe_info );
+        replace_process( new_params, &pe_info );
         RtlDestroyProcessParameters( new_params );
         break;
     default:
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 83ce56ca25..d8f9816422 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -795,8 +795,8 @@ struct exec_process_request
 {
     struct request_header __header;
     int          socket_fd;
-    obj_handle_t exe_file;
     client_cpu_t cpu;
+    char __pad_20[4];
 };
 struct exec_process_reply
 {
@@ -6691,6 +6691,6 @@ union generic_reply
     struct resume_process_reply resume_process_reply;
 };
 
-#define SERVER_PROTOCOL_VERSION 588
+#define SERVER_PROTOCOL_VERSION 589
 
 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/protocol.def b/server/protocol.def
index 984f2a10fd..3a0df20bdb 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -803,7 +803,6 @@ struct rawinput_device
 /* Execute a process, replacing the current one */
 @REQ(exec_process)
     int          socket_fd;      /* file descriptor for process socket */
-    obj_handle_t exe_file;       /* file handle for main exe */
     client_cpu_t cpu;            /* CPU that the new process will use */
 @END
 
diff --git a/server/request.h b/server/request.h
index be65a237dd..1303b35ef7 100644
--- a/server/request.h
+++ b/server/request.h
@@ -757,8 +757,7 @@ C_ASSERT( FIELD_OFFSET(struct new_process_reply, pid) == 12 );
 C_ASSERT( FIELD_OFFSET(struct new_process_reply, handle) == 16 );
 C_ASSERT( sizeof(struct new_process_reply) == 24 );
 C_ASSERT( FIELD_OFFSET(struct exec_process_request, socket_fd) == 12 );
-C_ASSERT( FIELD_OFFSET(struct exec_process_request, exe_file) == 16 );
-C_ASSERT( FIELD_OFFSET(struct exec_process_request, cpu) == 20 );
+C_ASSERT( FIELD_OFFSET(struct exec_process_request, cpu) == 16 );
 C_ASSERT( sizeof(struct exec_process_request) == 24 );
 C_ASSERT( FIELD_OFFSET(struct get_new_process_info_request, info) == 12 );
 C_ASSERT( sizeof(struct get_new_process_info_request) == 16 );
diff --git a/server/trace.c b/server/trace.c
index 0acfc92b27..55d5e68962 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -1265,7 +1265,6 @@ static void dump_new_process_reply( const struct new_process_reply *req )
 static void dump_exec_process_request( const struct exec_process_request *req )
 {
     fprintf( stderr, " socket_fd=%d", req->socket_fd );
-    fprintf( stderr, ", exe_file=%04x", req->exe_file );
     dump_client_cpu( ", cpu=", &req->cpu );
 }
 




More information about the wine-cvs mailing list