diff options
Diffstat (limited to 'tests/test-blockjob.c')
-rw-r--r-- | tests/test-blockjob.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c index cb42f06e61..b0462bfdec 100644 --- a/tests/test-blockjob.c +++ b/tests/test-blockjob.c @@ -176,9 +176,9 @@ static void cancel_job_complete(Job *job, Error **errp) s->should_complete = true; } -static void coroutine_fn cancel_job_start(void *opaque) +static int coroutine_fn cancel_job_run(Job *job, Error **errp) { - CancelJob *s = opaque; + CancelJob *s = container_of(job, CancelJob, common.job); while (!s->should_complete) { if (job_is_cancelled(&s->common.job)) { @@ -194,6 +194,7 @@ static void coroutine_fn cancel_job_start(void *opaque) defer: job_defer_to_main_loop(&s->common.job, cancel_job_completed, s); + return 0; } static const BlockJobDriver test_cancel_driver = { @@ -202,7 +203,7 @@ static const BlockJobDriver test_cancel_driver = { .free = block_job_free, .user_resume = block_job_user_resume, .drain = block_job_drain, - .start = cancel_job_start, + .run = cancel_job_run, .complete = cancel_job_complete, }, }; |