Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- server/console.c | 16 ++++++++-------- server/device.c | 6 +++--- server/fd.c | 3 +-- server/file.h | 4 ++-- server/named_pipe.c | 7 +++---- 5 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/server/console.c b/server/console.c index 0080e6ed163..df88b14f609 100644 --- a/server/console.c +++ b/server/console.c @@ -101,7 +101,7 @@ 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_volume_info( struct fd *fd, struct async *async, unsigned int info_class ); 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 void console_flush( struct fd *fd, struct async *async ); static int console_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
static const struct fd_ops console_fd_ops = @@ -326,7 +326,7 @@ static const struct object_ops console_input_ops = };
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 void 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 const struct fd_ops console_input_fd_ops = @@ -960,16 +960,16 @@ static void console_read( struct fd *fd, struct async *async, file_pos_t pos ) 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 void console_flush( struct fd *fd, struct async *async ) { struct console *console = get_fd_user( fd );
if (!console->server) { set_error( STATUS_INVALID_HANDLE ); - return 0; + return; } - return queue_host_ioctl( console->server, IOCTL_CONDRV_FLUSH, 0, NULL, NULL ); + queue_host_ioctl( console->server, IOCTL_CONDRV_FLUSH, 0, NULL, NULL ); }
static void screen_buffer_write( struct fd *fd, struct async *async, file_pos_t pos ) @@ -1361,16 +1361,16 @@ static void console_input_read( struct fd *fd, struct async *async, file_pos_t p console_read( console->fd, async, pos ); }
-static int console_input_flush( struct fd *fd, struct async *async ) +static void console_input_flush( struct fd *fd, struct async *async ) { struct console *console = current->process->console;
if (!console) { set_error( STATUS_INVALID_HANDLE ); - return 0; + return; } - return console_flush( console->fd, async ); + console_flush( console->fd, async ); }
static void console_output_dump( struct object *obj, int verbose ) diff --git a/server/device.c b/server/device.c index cc3e0466468..7e9954a9305 100644 --- a/server/device.c +++ b/server/device.c @@ -203,7 +203,7 @@ static void device_file_destroy( struct object *obj ); static enum server_fd_type device_file_get_fd_type( struct fd *fd ); static void device_file_read( struct fd *fd, struct async *async, file_pos_t pos ); static void 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 void 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 void device_file_reselect_async( struct fd *fd, struct async_queue *queue ); static void device_file_get_volume_info( struct fd *fd, struct async *async, unsigned int info_class ); @@ -649,14 +649,14 @@ static void device_file_write( struct fd *fd, struct async *async, file_pos_t po queue_irp( file, ¶ms, async ); }
-static int device_file_flush( struct fd *fd, struct async *async ) +static void device_file_flush( struct fd *fd, struct async *async ) { struct device_file *file = get_fd_user( fd ); irp_params_t params;
memset( ¶ms, 0, sizeof(params) ); params.flush.type = IRP_CALL_FLUSH; - return queue_irp( file, ¶ms, async ); + queue_irp( file, ¶ms, async ); }
static int device_file_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) diff --git a/server/fd.c b/server/fd.c index 6b79585147d..ca91ff724a1 100644 --- a/server/fd.c +++ b/server/fd.c @@ -2304,10 +2304,9 @@ void no_fd_write( struct fd *fd, struct async *async, file_pos_t pos ) }
/* default flush() routine */ -int no_fd_flush( struct fd *fd, struct async *async ) +void no_fd_flush( struct fd *fd, struct async *async ) { set_error( STATUS_OBJECT_TYPE_MISMATCH ); - return 0; }
/* default get_file_info() routine */ diff --git a/server/file.h b/server/file.h index e200281d03b..c4c33fc1e79 100644 --- a/server/file.h +++ b/server/file.h @@ -61,7 +61,7 @@ struct fd_ops /* perform a write on the file */ void (*write)(struct fd *, struct async *, file_pos_t ); /* flush the object buffers */ - int (*flush)(struct fd *, struct async *); + void (*flush)(struct fd *, struct async *); /* query file info */ void (*get_file_info)( struct fd *, obj_handle_t, unsigned int ); /* query volume info */ @@ -111,7 +111,7 @@ 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 no_fd_read( struct fd *fd, struct async *async, file_pos_t pos ); extern void 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 void 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 default_fd_get_file_info( struct fd *fd, obj_handle_t handle, unsigned int info_class ); extern void no_fd_get_volume_info( struct fd *fd, struct async *async, unsigned int info_class ); diff --git a/server/named_pipe.c b/server/named_pipe.c index 503dda93931..3d1b2d8b917 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -145,7 +145,7 @@ static int pipe_end_set_sd( struct object *obj, const struct security_descriptor static WCHAR *pipe_end_get_full_name( struct object *obj, data_size_t *len ); static void pipe_end_read( struct fd *fd, struct async *async, file_pos_t pos ); static void 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 void 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_reselect_async( struct fd *fd, struct async_queue *queue ); static void pipe_end_get_file_info( struct fd *fd, obj_handle_t handle, unsigned int info_class ); @@ -578,14 +578,14 @@ static void named_pipe_device_file_destroy( struct object *obj ) release_object( file->device ); }
-static int pipe_end_flush( struct fd *fd, struct async *async ) +static void pipe_end_flush( struct fd *fd, struct async *async ) { struct pipe_end *pipe_end = get_fd_user( fd );
if (!pipe_end->pipe) { set_error( STATUS_PIPE_DISCONNECTED ); - return 0; + return; }
if (pipe_end->connection && !list_empty( &pipe_end->connection->message_queue )) @@ -593,7 +593,6 @@ static int pipe_end_flush( struct fd *fd, struct async *async ) fd_queue_async( pipe_end->fd, async, ASYNC_TYPE_WAIT ); set_error( STATUS_PENDING ); } - return 1; }
static void pipe_end_get_file_info( struct fd *fd, obj_handle_t handle, unsigned int info_class )