static int inject_error(BlockDriverState *bs, BlkdebugRule *rule)

{

    BDRVBlkdebugState *s = bs->opaque;

    int error = rule->options.inject.error;

    bool immediately = rule->options.inject.immediately;



    if (rule->options.inject.once) {

        QSIMPLEQ_REMOVE(&s->active_rules, rule, BlkdebugRule, active_next);

        remove_rule(rule);

    }



    if (!immediately) {

        aio_bh_schedule_oneshot(bdrv_get_aio_context(bs), error_callback_bh,

                                qemu_coroutine_self());

        qemu_coroutine_yield();

    }



    return -error;

}

static int inject_error(BlockDriverState *bs, BlkdebugRule *rule)

{

    BDRVBlkdebugState *s = bs->opaque;

    int error = rule->options.inject.error;

    bool immediately = rule->options.inject.immediately;



    if (rule->options.inject.once) {

        QSIMPLEQ_REMOVE(&s->active_rules, rule, BlkdebugRule, active_next);

        remove_rule(rule);

    }



    if (!immediately) {

        aio_bh_schedule_oneshot(bdrv_get_aio_context(bs), error_callback_bh,

                                qemu_coroutine_self());

        qemu_coroutine_yield();

    }



    return -error;

}

        aio_bh_schedule_oneshot(bdrv_get_aio_context(bs), error_callback_bh,                                 qemu_coroutine_self());
static int FUNC_0(BlockDriverState *VAR_0, BlkdebugRule *VAR_1)

{

    BDRVBlkdebugState *s = VAR_0->opaque;

    int VAR_2 = VAR_1->options.inject.VAR_2;

    bool immediately = VAR_1->options.inject.immediately;



    if (VAR_1->options.inject.once) {

        QSIMPLEQ_REMOVE(&s->active_rules, VAR_1, BlkdebugRule, active_next);

        remove_rule(VAR_1);

    }



    if (!immediately) {

        aio_bh_schedule_oneshot(bdrv_get_aio_context(VAR_0), error_callback_bh,

                                qemu_coroutine_self());

        qemu_coroutine_yield();

    }



    return -VAR_2;

}

static int FUNC_0(BlockDriverState *VAR_0, BlkdebugRule *VAR_1)
{ BDRVBlkdebugState *s = VAR_0->opaque; int VAR_2 = VAR_1->options.inject.VAR_2; bool immediately = VAR_1->options.inject.immediately; if (VAR_1->options.inject.once) { QSIMPLEQ_REMOVE(&s->active_rules, VAR_1, BlkdebugRule, active_next); remove_rule(VAR_1); } if (!immediately) { aio_bh_schedule_oneshot(bdrv_get_aio_context(VAR_0), error_callback_bh,
qemu_coroutine_self()); qemu_coroutine_yield(); } return -VAR_2; }