Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
23dce688
Commit
23dce688
authored
Jul 04, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Call create_irp from queue_irp.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7b33613f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
38 deletions
+9
-38
device.c
server/device.c
+9
-38
No files found.
server/device.c
View file @
23dce688
...
...
@@ -462,12 +462,15 @@ static void set_file_user_ptr( struct device_file *file, client_ptr_t ptr )
}
/* queue an irp to the device */
static
int
queue_irp
(
struct
device_file
*
file
,
struct
irp_call
*
irp
,
struct
async
*
async
)
static
int
queue_irp
(
struct
device_file
*
file
,
const
irp_params_t
*
params
,
struct
async
*
async
)
{
fd_queue_async
(
file
->
fd
,
async
,
ASYNC_TYPE_WAIT
);
struct
irp_call
*
irp
=
create_irp
(
file
,
params
,
async
);
if
(
!
irp
)
return
0
;
fd_queue_async
(
file
->
fd
,
async
,
ASYNC_TYPE_WAIT
);
irp
->
async
=
(
struct
async
*
)
grab_object
(
async
);
add_irp_to_queue
(
file
,
irp
,
current
);
release_object
(
irp
);
set_error
(
STATUS_PENDING
);
return
1
;
}
...
...
@@ -480,8 +483,6 @@ static enum server_fd_type device_file_get_fd_type( struct fd *fd )
static
int
device_file_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
{
struct
device_file
*
file
=
get_fd_user
(
fd
);
struct
irp_call
*
irp
;
obj_handle_t
handle
;
irp_params_t
params
;
memset
(
&
params
,
0
,
sizeof
(
params
)
);
...
...
@@ -489,20 +490,12 @@ static int device_file_read( struct fd *fd, struct async *async, file_pos_t pos
params
.
read
.
key
=
0
;
params
.
read
.
pos
=
pos
;
params
.
read
.
file
=
file
->
user_ptr
;
irp
=
create_irp
(
file
,
&
params
,
async
);
if
(
!
irp
)
return
0
;
handle
=
queue_irp
(
file
,
irp
,
async
);
release_object
(
irp
);
return
handle
;
return
queue_irp
(
file
,
&
params
,
async
);
}
static
int
device_file_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
{
struct
device_file
*
file
=
get_fd_user
(
fd
);
struct
irp_call
*
irp
;
obj_handle_t
handle
;
irp_params_t
params
;
memset
(
&
params
,
0
,
sizeof
(
params
)
);
...
...
@@ -510,52 +503,30 @@ static int device_file_write( struct fd *fd, struct async *async, file_pos_t pos
params
.
write
.
key
=
0
;
params
.
write
.
pos
=
pos
;
params
.
write
.
file
=
file
->
user_ptr
;
irp
=
create_irp
(
file
,
&
params
,
async
);
if
(
!
irp
)
return
0
;
handle
=
queue_irp
(
file
,
irp
,
async
);
release_object
(
irp
);
return
handle
;
return
queue_irp
(
file
,
&
params
,
async
);
}
static
int
device_file_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
{
struct
device_file
*
file
=
get_fd_user
(
fd
);
struct
irp_call
*
irp
;
obj_handle_t
handle
;
irp_params_t
params
;
memset
(
&
params
,
0
,
sizeof
(
params
)
);
params
.
flush
.
major
=
IRP_MJ_FLUSH_BUFFERS
;
params
.
flush
.
file
=
file
->
user_ptr
;
irp
=
create_irp
(
file
,
&
params
,
NULL
);
if
(
!
irp
)
return
0
;
handle
=
queue_irp
(
file
,
irp
,
async
);
release_object
(
irp
);
return
handle
;
return
queue_irp
(
file
,
&
params
,
NULL
);
}
static
int
device_file_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
)
{
struct
device_file
*
file
=
get_fd_user
(
fd
);
struct
irp_call
*
irp
;
obj_handle_t
handle
;
irp_params_t
params
;
memset
(
&
params
,
0
,
sizeof
(
params
)
);
params
.
ioctl
.
major
=
IRP_MJ_DEVICE_CONTROL
;
params
.
ioctl
.
code
=
code
;
params
.
ioctl
.
file
=
file
->
user_ptr
;
irp
=
create_irp
(
file
,
&
params
,
async
);
if
(
!
irp
)
return
0
;
handle
=
queue_irp
(
file
,
irp
,
async
);
release_object
(
irp
);
return
handle
;
return
queue_irp
(
file
,
&
params
,
async
);
}
static
struct
device
*
create_device
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
...
...
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