mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
io: change the QIOTask callback signature
Currently the QIOTaskFunc signature takes an Object * for the source, and an Error * for any error. We also need to be able to provide a result pointer. Rather than continue to add parameters to QIOTaskFunc, remove the existing ones and simply pass the QIOTask object instead. This has methods to access all the other data items required in the callback impl. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
1a447e4f02
commit
60e705c51c
15 changed files with 110 additions and 112 deletions
|
@ -156,12 +156,11 @@ struct TestIOChannelData {
|
|||
};
|
||||
|
||||
|
||||
static void test_io_channel_complete(Object *src,
|
||||
Error *err,
|
||||
static void test_io_channel_complete(QIOTask *task,
|
||||
gpointer opaque)
|
||||
{
|
||||
struct TestIOChannelData *data = opaque;
|
||||
data->err = err != NULL;
|
||||
data->err = qio_task_propagate_error(task, NULL);
|
||||
g_main_loop_quit(data->loop);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue