Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
6d499911
Commit
6d499911
authored
Sep 02, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Return void from the read callback.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6cc36a46
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
22 deletions
+20
-22
console.c
server/console.c
+8
-8
device.c
server/device.c
+3
-3
fd.c
server/fd.c
+1
-2
file.h
server/file.h
+2
-2
named_pipe.c
server/named_pipe.c
+6
-7
No files found.
server/console.c
View file @
6d499911
...
@@ -100,7 +100,7 @@ static const struct object_ops console_ops =
...
@@ -100,7 +100,7 @@ static const struct object_ops console_ops =
static
enum
server_fd_type
console_get_fd_type
(
struct
fd
*
fd
);
static
enum
server_fd_type
console_get_fd_type
(
struct
fd
*
fd
);
static
void
console_get_file_info
(
struct
fd
*
fd
,
obj_handle_t
handle
,
unsigned
int
info_class
);
static
void
console_get_file_info
(
struct
fd
*
fd
,
obj_handle_t
handle
,
unsigned
int
info_class
);
static
void
console_get_volume_info
(
struct
fd
*
fd
,
struct
async
*
async
,
unsigned
int
info_class
);
static
void
console_get_volume_info
(
struct
fd
*
fd
,
struct
async
*
async
,
unsigned
int
info_class
);
static
int
console_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
void
console_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
int
console_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
int
console_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
int
console_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
int
console_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
...
@@ -325,7 +325,7 @@ static const struct object_ops console_input_ops =
...
@@ -325,7 +325,7 @@ static const struct object_ops console_input_ops =
console_input_destroy
/* destroy */
console_input_destroy
/* destroy */
};
};
static
int
console_input_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
void
console_input_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
int
console_input_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
int
console_input_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
int
console_input_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
int
console_input_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
...
@@ -948,16 +948,16 @@ static int console_ioctl( struct fd *fd, ioctl_code_t code, struct async *async
...
@@ -948,16 +948,16 @@ static int console_ioctl( struct fd *fd, ioctl_code_t code, struct async *async
}
}
}
}
static
int
console_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
static
void
console_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
{
{
struct
console
*
console
=
get_fd_user
(
fd
);
struct
console
*
console
=
get_fd_user
(
fd
);
if
(
!
console
->
server
)
if
(
!
console
->
server
)
{
{
set_error
(
STATUS_INVALID_HANDLE
);
set_error
(
STATUS_INVALID_HANDLE
);
return
0
;
return
;
}
}
return
queue_host_ioctl
(
console
->
server
,
IOCTL_CONDRV_READ_FILE
,
0
,
async
,
&
console
->
ioctl_q
);
queue_host_ioctl
(
console
->
server
,
IOCTL_CONDRV_READ_FILE
,
0
,
async
,
&
console
->
ioctl_q
);
}
}
static
int
console_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
static
int
console_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
...
@@ -1349,16 +1349,16 @@ static int console_input_ioctl( struct fd *fd, ioctl_code_t code, struct async *
...
@@ -1349,16 +1349,16 @@ static int console_input_ioctl( struct fd *fd, ioctl_code_t code, struct async *
return
console_ioctl
(
console
->
fd
,
code
,
async
);
return
console_ioctl
(
console
->
fd
,
code
,
async
);
}
}
static
int
console_input_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
static
void
console_input_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
{
{
struct
console
*
console
=
current
->
process
->
console
;
struct
console
*
console
=
current
->
process
->
console
;
if
(
!
console
)
if
(
!
console
)
{
{
set_error
(
STATUS_INVALID_HANDLE
);
set_error
(
STATUS_INVALID_HANDLE
);
return
0
;
return
;
}
}
return
console_read
(
console
->
fd
,
async
,
pos
);
console_read
(
console
->
fd
,
async
,
pos
);
}
}
static
int
console_input_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
static
int
console_input_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
...
...
server/device.c
View file @
6d499911
...
@@ -201,7 +201,7 @@ static struct list *device_file_get_kernel_obj_list( struct object *obj );
...
@@ -201,7 +201,7 @@ static struct list *device_file_get_kernel_obj_list( struct object *obj );
static
int
device_file_close_handle
(
struct
object
*
obj
,
struct
process
*
process
,
obj_handle_t
handle
);
static
int
device_file_close_handle
(
struct
object
*
obj
,
struct
process
*
process
,
obj_handle_t
handle
);
static
void
device_file_destroy
(
struct
object
*
obj
);
static
void
device_file_destroy
(
struct
object
*
obj
);
static
enum
server_fd_type
device_file_get_fd_type
(
struct
fd
*
fd
);
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
);
static
void
device_file_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
int
device_file_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
int
device_file_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
int
device_file_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
int
device_file_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
int
device_file_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
int
device_file_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
...
@@ -625,7 +625,7 @@ static void device_file_get_volume_info( struct fd *fd, struct async *async, uns
...
@@ -625,7 +625,7 @@ static void device_file_get_volume_info( struct fd *fd, struct async *async, uns
queue_irp
(
file
,
&
params
,
async
);
queue_irp
(
file
,
&
params
,
async
);
}
}
static
int
device_file_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
static
void
device_file_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
{
{
struct
device_file
*
file
=
get_fd_user
(
fd
);
struct
device_file
*
file
=
get_fd_user
(
fd
);
irp_params_t
params
;
irp_params_t
params
;
...
@@ -634,7 +634,7 @@ static int device_file_read( struct fd *fd, struct async *async, file_pos_t pos
...
@@ -634,7 +634,7 @@ static int device_file_read( struct fd *fd, struct async *async, file_pos_t pos
params
.
read
.
type
=
IRP_CALL_READ
;
params
.
read
.
type
=
IRP_CALL_READ
;
params
.
read
.
key
=
0
;
params
.
read
.
key
=
0
;
params
.
read
.
pos
=
pos
;
params
.
read
.
pos
=
pos
;
return
queue_irp
(
file
,
&
params
,
async
);
queue_irp
(
file
,
&
params
,
async
);
}
}
static
int
device_file_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
static
int
device_file_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
...
...
server/fd.c
View file @
6d499911
...
@@ -2292,10 +2292,9 @@ static void unmount_device( struct fd *device_fd )
...
@@ -2292,10 +2292,9 @@ static void unmount_device( struct fd *device_fd )
}
}
/* default read() routine */
/* default read() routine */
int
no_fd_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
void
no_fd_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
{
{
set_error
(
STATUS_OBJECT_TYPE_MISMATCH
);
set_error
(
STATUS_OBJECT_TYPE_MISMATCH
);
return
0
;
}
}
/* default write() routine */
/* default write() routine */
...
...
server/file.h
View file @
6d499911
...
@@ -57,7 +57,7 @@ struct fd_ops
...
@@ -57,7 +57,7 @@ struct fd_ops
/* get file information */
/* get file information */
enum
server_fd_type
(
*
get_fd_type
)(
struct
fd
*
fd
);
enum
server_fd_type
(
*
get_fd_type
)(
struct
fd
*
fd
);
/* perform a read on the file */
/* perform a read on the file */
int
(
*
read
)(
struct
fd
*
,
struct
async
*
,
file_pos_t
);
void
(
*
read
)(
struct
fd
*
,
struct
async
*
,
file_pos_t
);
/* perform a write on the file */
/* perform a write on the file */
int
(
*
write
)(
struct
fd
*
,
struct
async
*
,
file_pos_t
);
int
(
*
write
)(
struct
fd
*
,
struct
async
*
,
file_pos_t
);
/* flush the object buffers */
/* flush the object buffers */
...
@@ -109,7 +109,7 @@ extern void default_poll_event( struct fd *fd, int event );
...
@@ -109,7 +109,7 @@ extern void default_poll_event( struct fd *fd, int event );
extern
void
fd_queue_async
(
struct
fd
*
fd
,
struct
async
*
async
,
int
type
);
extern
void
fd_queue_async
(
struct
fd
*
fd
,
struct
async
*
async
,
int
type
);
extern
void
fd_async_wake_up
(
struct
fd
*
fd
,
int
type
,
unsigned
int
status
);
extern
void
fd_async_wake_up
(
struct
fd
*
fd
,
int
type
,
unsigned
int
status
);
extern
void
fd_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
extern
void
fd_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
extern
int
no_fd_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
extern
void
no_fd_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
extern
int
no_fd_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
extern
int
no_fd_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
extern
int
no_fd_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
extern
int
no_fd_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
extern
void
no_fd_get_file_info
(
struct
fd
*
fd
,
obj_handle_t
handle
,
unsigned
int
info_class
);
extern
void
no_fd_get_file_info
(
struct
fd
*
fd
,
obj_handle_t
handle
,
unsigned
int
info_class
);
...
...
server/named_pipe.c
View file @
6d499911
...
@@ -143,7 +143,7 @@ static struct security_descriptor *pipe_end_get_sd( struct object *obj );
...
@@ -143,7 +143,7 @@ static struct security_descriptor *pipe_end_get_sd( struct object *obj );
static
int
pipe_end_set_sd
(
struct
object
*
obj
,
const
struct
security_descriptor
*
sd
,
static
int
pipe_end_set_sd
(
struct
object
*
obj
,
const
struct
security_descriptor
*
sd
,
unsigned
int
set_info
);
unsigned
int
set_info
);
static
WCHAR
*
pipe_end_get_full_name
(
struct
object
*
obj
,
data_size_t
*
len
);
static
WCHAR
*
pipe_end_get_full_name
(
struct
object
*
obj
,
data_size_t
*
len
);
static
int
pipe_end_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
void
pipe_end_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
int
pipe_end_write
(
struct
fd
*
fd
,
struct
async
*
async_data
,
file_pos_t
pos
);
static
int
pipe_end_write
(
struct
fd
*
fd
,
struct
async
*
async_data
,
file_pos_t
pos
);
static
int
pipe_end_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
int
pipe_end_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
void
pipe_end_get_volume_info
(
struct
fd
*
fd
,
struct
async
*
async
,
unsigned
int
info_class
);
static
void
pipe_end_get_volume_info
(
struct
fd
*
fd
,
struct
async
*
async
,
unsigned
int
info_class
);
...
@@ -893,7 +893,7 @@ static void reselect_write_queue( struct pipe_end *pipe_end )
...
@@ -893,7 +893,7 @@ static void reselect_write_queue( struct pipe_end *pipe_end )
reselect_read_queue
(
reader
,
0
);
reselect_read_queue
(
reader
,
0
);
}
}
static
int
pipe_end_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
static
void
pipe_end_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
{
{
struct
pipe_end
*
pipe_end
=
get_fd_user
(
fd
);
struct
pipe_end
*
pipe_end
=
get_fd_user
(
fd
);
...
@@ -903,25 +903,24 @@ static int pipe_end_read( struct fd *fd, struct async *async, file_pos_t pos )
...
@@ -903,25 +903,24 @@ static int pipe_end_read( struct fd *fd, struct async *async, file_pos_t pos )
if
((
pipe_end
->
flags
&
NAMED_PIPE_NONBLOCKING_MODE
)
&&
list_empty
(
&
pipe_end
->
message_queue
))
if
((
pipe_end
->
flags
&
NAMED_PIPE_NONBLOCKING_MODE
)
&&
list_empty
(
&
pipe_end
->
message_queue
))
{
{
set_error
(
STATUS_PIPE_EMPTY
);
set_error
(
STATUS_PIPE_EMPTY
);
return
0
;
return
;
}
}
break
;
break
;
case
FILE_PIPE_DISCONNECTED_STATE
:
case
FILE_PIPE_DISCONNECTED_STATE
:
set_error
(
STATUS_PIPE_DISCONNECTED
);
set_error
(
STATUS_PIPE_DISCONNECTED
);
return
0
;
return
;
case
FILE_PIPE_LISTENING_STATE
:
case
FILE_PIPE_LISTENING_STATE
:
set_error
(
STATUS_PIPE_LISTENING
);
set_error
(
STATUS_PIPE_LISTENING
);
return
0
;
return
;
case
FILE_PIPE_CLOSING_STATE
:
case
FILE_PIPE_CLOSING_STATE
:
if
(
!
list_empty
(
&
pipe_end
->
message_queue
))
break
;
if
(
!
list_empty
(
&
pipe_end
->
message_queue
))
break
;
set_error
(
STATUS_PIPE_BROKEN
);
set_error
(
STATUS_PIPE_BROKEN
);
return
0
;
return
;
}
}
queue_async
(
&
pipe_end
->
read_q
,
async
);
queue_async
(
&
pipe_end
->
read_q
,
async
);
reselect_read_queue
(
pipe_end
,
0
);
reselect_read_queue
(
pipe_end
,
0
);
set_error
(
STATUS_PENDING
);
set_error
(
STATUS_PENDING
);
return
1
;
}
}
static
int
pipe_end_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
static
int
pipe_end_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
)
...
...
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