static BlockAIOCB *inject_error(BlockDriverState *bs,

    BlockCompletionFunc *cb, void *opaque, BlkdebugRule *rule)

{

    BDRVBlkdebugState *s = bs->opaque;

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

    struct BlkdebugAIOCB *acb;

    QEMUBH *bh;



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

        QSIMPLEQ_INIT(&s->active_rules);

    }



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

        return NULL;

    }



    acb = qemu_aio_get(&blkdebug_aiocb_info, bs, cb, opaque);

    acb->ret = -error;



    bh = aio_bh_new(bdrv_get_aio_context(bs), error_callback_bh, acb);

    acb->bh = bh;

    qemu_bh_schedule(bh);



    return &acb->common;

}

static BlockAIOCB *inject_error(BlockDriverState *bs,

    BlockCompletionFunc *cb, void *opaque, BlkdebugRule *rule)

{

    BDRVBlkdebugState *s = bs->opaque;

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

    struct BlkdebugAIOCB *acb;

    QEMUBH *bh;



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

        QSIMPLEQ_INIT(&s->active_rules);

    }



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

        return NULL;

    }



    acb = qemu_aio_get(&blkdebug_aiocb_info, bs, cb, opaque);

    acb->ret = -error;



    bh = aio_bh_new(bdrv_get_aio_context(bs), error_callback_bh, acb);

    acb->bh = bh;

    qemu_bh_schedule(bh);



    return &acb->common;

}

        QSIMPLEQ_INIT(&s->active_rules);     if (rule->options.inject.immediately) {
static BlockAIOCB *FUNC_0(BlockDriverState *bs,

    BlockCompletionFunc *cb, void *opaque, BlkdebugRule *rule)

{

    BDRVBlkdebugState *s = bs->opaque;

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

    struct BlkdebugAIOCB *VAR_1;

    QEMUBH *bh;



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

        QSIMPLEQ_INIT(&s->active_rules);

    }



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

        return NULL;

    }



    VAR_1 = qemu_aio_get(&blkdebug_aiocb_info, bs, cb, opaque);

    VAR_1->ret = -VAR_0;



    bh = aio_bh_new(bdrv_get_aio_context(bs), error_callback_bh, VAR_1);

    VAR_1->bh = bh;

    qemu_bh_schedule(bh);



    return &VAR_1->common;

}

static BlockAIOCB *FUNC_0(BlockDriverState *bs,
BlockCompletionFunc *cb, void *opaque, BlkdebugRule *rule)
{ BDRVBlkdebugState *s = bs->opaque; int VAR_0 = rule->options.inject.VAR_0; struct BlkdebugAIOCB *VAR_1; QEMUBH *bh; if (rule->options.inject.once) { QSIMPLEQ_INIT(&s->active_rules); } if (rule->options.inject.immediately) { return NULL; } VAR_1 = qemu_aio_get(&blkdebug_aiocb_info, bs, cb, opaque); VAR_1->ret = -VAR_0; bh = aio_bh_new(bdrv_get_aio_context(bs), error_callback_bh, VAR_1); VAR_1->bh = bh; qemu_bh_schedule(bh); return &VAR_1->common; }