Sebastian Lackner : server: Remove unused device manager argument from set_irp_result call.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Oct 29 09:32:11 CDT 2015


Module: wine
Branch: master
Commit: 408b7ea6b3607217152a0af34ea9d700d8573c28
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=408b7ea6b3607217152a0af34ea9d700d8573c28

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Wed Oct 28 23:18:49 2015 +0100

server: Remove unused device manager argument from set_irp_result call.

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntoskrnl.exe/ntoskrnl.c   | 2 --
 include/wine/server_protocol.h | 6 ++----
 server/device.c                | 6 ------
 server/protocol.def            | 3 +--
 server/request.h               | 9 ++++-----
 server/trace.c                 | 5 ++---
 6 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 96af772..31f0b15 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1271,13 +1271,11 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost )
     handle = (HANDLE)irp->UserIosb;
     if (handle)
     {
-        HANDLE manager = get_device_manager();
         void *out_buff = irp->UserBuffer;
         FILE_OBJECT *file = irp->Tail.Overlay.OriginalFileObject;
 
         SERVER_START_REQ( set_irp_result )
         {
-            req->manager  = wine_server_obj_handle( manager );
             req->handle   = wine_server_obj_handle( handle );
             req->status   = irp->IoStatus.u.Status;
             req->file_ptr = wine_server_client_ptr( file );
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 2ba71e8..105273d 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -3228,13 +3228,11 @@ struct ioctl_reply
 struct set_irp_result_request
 {
     struct request_header __header;
-    obj_handle_t manager;
     obj_handle_t handle;
     unsigned int status;
-    client_ptr_t file_ptr;
     data_size_t  size;
+    client_ptr_t file_ptr;
     /* VARARG(data,bytes); */
-    char __pad_36[4];
 };
 struct set_irp_result_reply
 {
@@ -6149,6 +6147,6 @@ union generic_reply
     struct terminate_job_reply terminate_job_reply;
 };
 
-#define SERVER_PROTOCOL_VERSION 487
+#define SERVER_PROTOCOL_VERSION 488
 
 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/device.c b/server/device.c
index 9ef587c..fb91c02 100644
--- a/server/device.c
+++ b/server/device.c
@@ -807,11 +807,6 @@ DECL_HANDLER(get_next_device_request)
 DECL_HANDLER(set_irp_result)
 {
     struct irp_call *irp;
-    struct device_manager *manager;
-
-    if (!(manager = (struct device_manager *)get_handle_obj( current->process, req->manager,
-                                                             0, &device_manager_ops )))
-        return;
 
     if ((irp = (struct irp_call *)get_handle_obj( current->process, req->handle, 0, &irp_call_ops )))
     {
@@ -820,7 +815,6 @@ DECL_HANDLER(set_irp_result)
         close_handle( current->process, req->handle );  /* avoid an extra round-trip for close */
         release_object( irp );
     }
-    release_object( manager );
 }
 
 
diff --git a/server/protocol.def b/server/protocol.def
index c313006..5b45078 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2345,11 +2345,10 @@ enum message_type
 
 /* Store results of an async irp */
 @REQ(set_irp_result)
-    obj_handle_t manager;         /* handle to the device manager */
     obj_handle_t handle;          /* handle to the irp */
     unsigned int status;          /* status of the irp */
-    client_ptr_t file_ptr;        /* opaque pointer to the file object */
     data_size_t  size;            /* result size (input or output depending on the operation) */
+    client_ptr_t file_ptr;        /* opaque pointer to the file object */
     VARARG(data,bytes);           /* output data of the irp */
 @END
 
diff --git a/server/request.h b/server/request.h
index 9405179..fefabaa 100644
--- a/server/request.h
+++ b/server/request.h
@@ -1563,12 +1563,11 @@ C_ASSERT( sizeof(struct ioctl_request) == 64 );
 C_ASSERT( FIELD_OFFSET(struct ioctl_reply, wait) == 8 );
 C_ASSERT( FIELD_OFFSET(struct ioctl_reply, options) == 12 );
 C_ASSERT( sizeof(struct ioctl_reply) == 16 );
-C_ASSERT( FIELD_OFFSET(struct set_irp_result_request, manager) == 12 );
-C_ASSERT( FIELD_OFFSET(struct set_irp_result_request, handle) == 16 );
-C_ASSERT( FIELD_OFFSET(struct set_irp_result_request, status) == 20 );
+C_ASSERT( FIELD_OFFSET(struct set_irp_result_request, handle) == 12 );
+C_ASSERT( FIELD_OFFSET(struct set_irp_result_request, status) == 16 );
+C_ASSERT( FIELD_OFFSET(struct set_irp_result_request, size) == 20 );
 C_ASSERT( FIELD_OFFSET(struct set_irp_result_request, file_ptr) == 24 );
-C_ASSERT( FIELD_OFFSET(struct set_irp_result_request, size) == 32 );
-C_ASSERT( sizeof(struct set_irp_result_request) == 40 );
+C_ASSERT( sizeof(struct set_irp_result_request) == 32 );
 C_ASSERT( FIELD_OFFSET(struct get_irp_result_request, handle) == 12 );
 C_ASSERT( FIELD_OFFSET(struct get_irp_result_request, user_arg) == 16 );
 C_ASSERT( sizeof(struct get_irp_result_request) == 24 );
diff --git a/server/trace.c b/server/trace.c
index 07aee80..62867c2 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -2834,11 +2834,10 @@ static void dump_ioctl_reply( const struct ioctl_reply *req )
 
 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
 {
-    fprintf( stderr, " manager=%04x", req->manager );
-    fprintf( stderr, ", handle=%04x", req->handle );
+    fprintf( stderr, " handle=%04x", req->handle );
     fprintf( stderr, ", status=%08x", req->status );
-    dump_uint64( ", file_ptr=", &req->file_ptr );
     fprintf( stderr, ", size=%u", req->size );
+    dump_uint64( ", file_ptr=", &req->file_ptr );
     dump_varargs_bytes( ", data=", cur_size );
 }
 




More information about the wine-cvs mailing list