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
6073e75a
Commit
6073e75a
authored
May 06, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Implement flush requests for device files.
parent
48151717
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
device.c
server/device.c
+19
-1
trace.c
server/trace.c
+3
-0
No files found.
server/device.c
View file @
6073e75a
...
...
@@ -131,6 +131,7 @@ static obj_handle_t device_read( struct fd *fd, const async_data_t *async_data,
file_pos_t
pos
);
static
obj_handle_t
device_write
(
struct
fd
*
fd
,
const
async_data_t
*
async_data
,
int
blocking
,
file_pos_t
pos
,
data_size_t
*
written
);
static
obj_handle_t
device_flush
(
struct
fd
*
fd
,
const
async_data_t
*
async_data
,
int
blocking
);
static
obj_handle_t
device_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
const
async_data_t
*
async_data
,
int
blocking
);
...
...
@@ -161,7 +162,7 @@ static const struct fd_ops device_fd_ops =
device_get_fd_type
,
/* get_fd_type */
device_read
,
/* read */
device_write
,
/* write */
no_fd_flush
,
/* flush */
device_flush
,
/* flush */
device_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
@@ -388,6 +389,23 @@ static obj_handle_t device_write( struct fd *fd, const async_data_t *async_data,
return
handle
;
}
static
obj_handle_t
device_flush
(
struct
fd
*
fd
,
const
async_data_t
*
async_data
,
int
blocking
)
{
struct
device
*
device
=
get_fd_user
(
fd
);
struct
irp_call
*
irp
;
obj_handle_t
handle
;
irp_params_t
params
;
params
.
major
=
IRP_MJ_FLUSH_BUFFERS
;
irp
=
create_irp
(
device
,
&
params
,
NULL
,
0
,
0
);
if
(
!
irp
)
return
0
;
handle
=
queue_irp
(
device
,
irp
,
async_data
,
blocking
);
release_object
(
irp
);
return
handle
;
}
static
obj_handle_t
device_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
const
async_data_t
*
async_data
,
int
blocking
)
{
...
...
server/trace.c
View file @
6073e75a
...
...
@@ -326,6 +326,9 @@ static void dump_irp_params( const char *prefix, const irp_params_t *data )
dump_uint64
(
",pos="
,
&
data
->
write
.
pos
);
fputc
(
'}'
,
stderr
);
break
;
case
IRP_MJ_FLUSH_BUFFERS
:
fprintf
(
stderr
,
"%s{major=FLUSH_BUFFERS}"
,
prefix
);
break
;
case
IRP_MJ_DEVICE_CONTROL
:
fprintf
(
stderr
,
"%s{major=DEVICE_CONTROL"
,
prefix
);
dump_ioctl_code
(
",code="
,
&
data
->
ioctl
.
code
);
...
...
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