mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 17:02:08 +00:00
server: Make the device opaque data a client_ptr_t instead of a void pointer.
This commit is contained in:
parent
0cd3ff6cbe
commit
923310aa54
|
@ -225,7 +225,7 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event )
|
|||
{
|
||||
code = reply->code;
|
||||
ioctl = reply->next;
|
||||
device = reply->user_ptr;
|
||||
device = wine_server_get_ptr( reply->user_ptr );
|
||||
in_size = reply->in_size;
|
||||
out_size = reply->out_size;
|
||||
}
|
||||
|
@ -491,7 +491,7 @@ NTSTATUS WINAPI IoCreateDevice( DRIVER_OBJECT *driver, ULONG ext_size,
|
|||
req->attributes = 0;
|
||||
req->rootdir = 0;
|
||||
req->manager = wine_server_obj_handle( manager );
|
||||
req->user_ptr = device;
|
||||
req->user_ptr = wine_server_client_ptr( device );
|
||||
if (name) wine_server_add_data( req, name->Buffer, name->Length );
|
||||
if (!(status = wine_server_call( req ))) handle = wine_server_ptr_handle( reply->handle );
|
||||
}
|
||||
|
|
|
@ -4118,7 +4118,7 @@ struct create_device_request
|
|||
unsigned int attributes;
|
||||
obj_handle_t rootdir;
|
||||
obj_handle_t manager;
|
||||
void* user_ptr;
|
||||
client_ptr_t user_ptr;
|
||||
/* VARARG(name,unicode_str); */
|
||||
};
|
||||
struct create_device_reply
|
||||
|
@ -4154,7 +4154,7 @@ struct get_next_device_request_reply
|
|||
struct reply_header __header;
|
||||
obj_handle_t next;
|
||||
ioctl_code_t code;
|
||||
void* user_ptr;
|
||||
client_ptr_t user_ptr;
|
||||
data_size_t in_size;
|
||||
data_size_t out_size;
|
||||
/* VARARG(next_data,bytes); */
|
||||
|
@ -5052,6 +5052,6 @@ union generic_reply
|
|||
struct set_window_layered_info_reply set_window_layered_info_reply;
|
||||
};
|
||||
|
||||
#define SERVER_PROTOCOL_VERSION 360
|
||||
#define SERVER_PROTOCOL_VERSION 361
|
||||
|
||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||
|
|
|
@ -112,7 +112,7 @@ struct device
|
|||
struct object obj; /* object header */
|
||||
struct device_manager *manager; /* manager for this device (or NULL if deleted) */
|
||||
struct fd *fd; /* file descriptor for ioctl */
|
||||
void *user_ptr; /* opaque ptr for client side */
|
||||
client_ptr_t user_ptr; /* opaque ptr for client side */
|
||||
struct list entry; /* entry in device manager list */
|
||||
struct list requests; /* list of pending ioctl requests */
|
||||
};
|
||||
|
|
|
@ -2961,7 +2961,7 @@ enum message_type
|
|||
unsigned int attributes; /* object attributes */
|
||||
obj_handle_t rootdir; /* root directory */
|
||||
obj_handle_t manager; /* device manager */
|
||||
void* user_ptr; /* opaque ptr for use by client */
|
||||
client_ptr_t user_ptr; /* opaque ptr for use by client */
|
||||
VARARG(name,unicode_str); /* object name */
|
||||
@REPLY
|
||||
obj_handle_t handle; /* handle to the device */
|
||||
|
@ -2983,7 +2983,7 @@ enum message_type
|
|||
@REPLY
|
||||
obj_handle_t next; /* handle to the next ioctl */
|
||||
ioctl_code_t code; /* ioctl code */
|
||||
void* user_ptr; /* opaque ptr for the device */
|
||||
client_ptr_t user_ptr; /* opaque ptr for the device */
|
||||
data_size_t in_size; /* total needed input size */
|
||||
data_size_t out_size; /* needed output size */
|
||||
VARARG(next_data,bytes); /* input data of the next ioctl */
|
||||
|
|
|
@ -3729,7 +3729,9 @@ static void dump_create_device_request( const struct create_device_request *req
|
|||
fprintf( stderr, " attributes=%08x,", req->attributes );
|
||||
fprintf( stderr, " rootdir=%04x,", req->rootdir );
|
||||
fprintf( stderr, " manager=%04x,", req->manager );
|
||||
fprintf( stderr, " user_ptr=%p,", req->user_ptr );
|
||||
fprintf( stderr, " user_ptr=" );
|
||||
dump_uint64( &req->user_ptr );
|
||||
fprintf( stderr, "," );
|
||||
fprintf( stderr, " name=" );
|
||||
dump_varargs_unicode_str( cur_size );
|
||||
}
|
||||
|
@ -3759,7 +3761,9 @@ static void dump_get_next_device_request_reply( const struct get_next_device_req
|
|||
fprintf( stderr, " code=" );
|
||||
dump_ioctl_code( &req->code );
|
||||
fprintf( stderr, "," );
|
||||
fprintf( stderr, " user_ptr=%p,", req->user_ptr );
|
||||
fprintf( stderr, " user_ptr=" );
|
||||
dump_uint64( &req->user_ptr );
|
||||
fprintf( stderr, "," );
|
||||
fprintf( stderr, " in_size=%u,", req->in_size );
|
||||
fprintf( stderr, " out_size=%u,", req->out_size );
|
||||
fprintf( stderr, " next_data=" );
|
||||
|
|
Loading…
Reference in a new issue