server: Return void from the write callback.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6d49991188
commit
377d18c7b1
|
@ -240,7 +240,7 @@ static const struct object_ops screen_buffer_ops =
|
|||
screen_buffer_destroy /* destroy */
|
||||
};
|
||||
|
||||
static int screen_buffer_write( struct fd *fd, struct async *async, file_pos_t pos );
|
||||
static void screen_buffer_write( struct fd *fd, struct async *async, file_pos_t pos );
|
||||
static int screen_buffer_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
|
||||
|
||||
static const struct fd_ops screen_buffer_fd_ops =
|
||||
|
@ -381,7 +381,7 @@ static const struct object_ops console_output_ops =
|
|||
console_output_destroy /* destroy */
|
||||
};
|
||||
|
||||
static int console_output_write( struct fd *fd, struct async *async, file_pos_t pos );
|
||||
static void console_output_write( struct fd *fd, struct async *async, file_pos_t pos );
|
||||
static int console_output_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
|
||||
|
||||
static const struct fd_ops console_output_fd_ops =
|
||||
|
@ -972,18 +972,18 @@ static int console_flush( struct fd *fd, struct async *async )
|
|||
return queue_host_ioctl( console->server, IOCTL_CONDRV_FLUSH, 0, NULL, NULL );
|
||||
}
|
||||
|
||||
static int screen_buffer_write( struct fd *fd, struct async *async, file_pos_t pos )
|
||||
static void screen_buffer_write( struct fd *fd, struct async *async, file_pos_t pos )
|
||||
{
|
||||
struct screen_buffer *screen_buffer = get_fd_user( fd );
|
||||
|
||||
if (!screen_buffer->input || !screen_buffer->input->server)
|
||||
{
|
||||
set_error( STATUS_INVALID_HANDLE );
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
return queue_host_ioctl( screen_buffer->input->server, IOCTL_CONDRV_WRITE_FILE,
|
||||
screen_buffer->id, async, &screen_buffer->ioctl_q );
|
||||
queue_host_ioctl( screen_buffer->input->server, IOCTL_CONDRV_WRITE_FILE,
|
||||
screen_buffer->id, async, &screen_buffer->ioctl_q );
|
||||
}
|
||||
|
||||
static int screen_buffer_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
|
||||
|
@ -1421,16 +1421,16 @@ static int console_output_ioctl( struct fd *fd, ioctl_code_t code, struct async
|
|||
return screen_buffer_ioctl( console->active->fd, code, async );
|
||||
}
|
||||
|
||||
static int console_output_write( struct fd *fd, struct async *async, file_pos_t pos )
|
||||
static void console_output_write( struct fd *fd, struct async *async, file_pos_t pos )
|
||||
{
|
||||
struct console *console = current->process->console;
|
||||
|
||||
if (!console || !console->active)
|
||||
{
|
||||
set_error( STATUS_INVALID_HANDLE );
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
return screen_buffer_write( console->active->fd, async, pos );
|
||||
screen_buffer_write( console->active->fd, async, pos );
|
||||
}
|
||||
|
||||
struct object *create_console_device( struct object *root, const struct unicode_str *name,
|
||||
|
|
|
@ -202,7 +202,7 @@ static int device_file_close_handle( struct object *obj, struct process *process
|
|||
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 int device_file_write( 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 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 );
|
||||
|
@ -637,7 +637,7 @@ static void device_file_read( struct fd *fd, struct async *async, file_pos_t pos
|
|||
queue_irp( file, ¶ms, async );
|
||||
}
|
||||
|
||||
static int device_file_write( 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 )
|
||||
{
|
||||
struct device_file *file = get_fd_user( fd );
|
||||
irp_params_t params;
|
||||
|
@ -646,7 +646,7 @@ static int device_file_write( struct fd *fd, struct async *async, file_pos_t pos
|
|||
params.write.type = IRP_CALL_WRITE;
|
||||
params.write.key = 0;
|
||||
params.write.pos = pos;
|
||||
return queue_irp( file, ¶ms, async );
|
||||
queue_irp( file, ¶ms, async );
|
||||
}
|
||||
|
||||
static int device_file_flush( struct fd *fd, struct async *async )
|
||||
|
|
|
@ -2298,10 +2298,9 @@ void no_fd_read( struct fd *fd, struct async *async, file_pos_t pos )
|
|||
}
|
||||
|
||||
/* default write() routine */
|
||||
int no_fd_write( struct fd *fd, struct async *async, file_pos_t pos )
|
||||
void no_fd_write( struct fd *fd, struct async *async, file_pos_t pos )
|
||||
{
|
||||
set_error( STATUS_OBJECT_TYPE_MISMATCH );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* default flush() routine */
|
||||
|
|
|
@ -59,7 +59,7 @@ struct fd_ops
|
|||
/* perform a read on the file */
|
||||
void (*read)(struct fd *, struct async *, file_pos_t );
|
||||
/* perform a write on the file */
|
||||
int (*write)(struct fd *, struct async *, file_pos_t );
|
||||
void (*write)(struct fd *, struct async *, file_pos_t );
|
||||
/* flush the object buffers */
|
||||
int (*flush)(struct fd *, struct async *);
|
||||
/* query file info */
|
||||
|
@ -110,7 +110,7 @@ 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_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 int no_fd_write( 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_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 );
|
||||
|
|
|
@ -144,7 +144,7 @@ static int pipe_end_set_sd( struct object *obj, const struct security_descriptor
|
|||
unsigned int set_info );
|
||||
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 int pipe_end_write( struct fd *fd, struct async *async_data, 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_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 );
|
||||
|
@ -923,7 +923,7 @@ static void pipe_end_read( struct fd *fd, struct async *async, file_pos_t pos )
|
|||
set_error( STATUS_PENDING );
|
||||
}
|
||||
|
||||
static int pipe_end_write( struct fd *fd, struct async *async, file_pos_t pos )
|
||||
static void pipe_end_write( struct fd *fd, struct async *async, file_pos_t pos )
|
||||
{
|
||||
struct pipe_end *pipe_end = get_fd_user( fd );
|
||||
struct pipe_message *message;
|
||||
|
@ -935,27 +935,26 @@ static int pipe_end_write( struct fd *fd, struct async *async, file_pos_t pos )
|
|||
break;
|
||||
case FILE_PIPE_DISCONNECTED_STATE:
|
||||
set_error( STATUS_PIPE_DISCONNECTED );
|
||||
return 0;
|
||||
return;
|
||||
case FILE_PIPE_LISTENING_STATE:
|
||||
set_error( STATUS_PIPE_LISTENING );
|
||||
return 0;
|
||||
return;
|
||||
case FILE_PIPE_CLOSING_STATE:
|
||||
set_error( STATUS_PIPE_CLOSING );
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pipe_end->pipe->message_mode && !get_req_data_size()) return 1;
|
||||
if (!pipe_end->pipe->message_mode && !get_req_data_size()) return;
|
||||
|
||||
iosb = async_get_iosb( async );
|
||||
message = queue_message( pipe_end->connection, iosb );
|
||||
release_object( iosb );
|
||||
if (!message) return 0;
|
||||
if (!message) return;
|
||||
|
||||
message->async = (struct async *)grab_object( async );
|
||||
queue_async( &pipe_end->write_q, async );
|
||||
reselect_read_queue( pipe_end->connection, 1 );
|
||||
set_error( STATUS_PENDING );
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue )
|
||||
|
|
Loading…
Reference in New Issue