void bdrv_error_action(BlockDriverState *bs, BlockErrorAction action,

                       bool is_read, int error)

{

    assert(error >= 0);

    bdrv_emit_qmp_error_event(bs, QEVENT_BLOCK_IO_ERROR, action, is_read);

    if (action == BDRV_ACTION_STOP) {

        vm_stop(RUN_STATE_IO_ERROR);

        bdrv_iostatus_set_err(bs, error);

    }

}

void bdrv_error_action(BlockDriverState *bs, BlockErrorAction action,

                       bool is_read, int error)

{

    assert(error >= 0);

    bdrv_emit_qmp_error_event(bs, QEVENT_BLOCK_IO_ERROR, action, is_read);

    if (action == BDRV_ACTION_STOP) {

        vm_stop(RUN_STATE_IO_ERROR);

        bdrv_iostatus_set_err(bs, error);

    }

}

    bdrv_emit_qmp_error_event(bs, QEVENT_BLOCK_IO_ERROR, action, is_read);         vm_stop(RUN_STATE_IO_ERROR);
void FUNC_0(BlockDriverState *VAR_0, BlockErrorAction VAR_1,

                       bool VAR_2, int VAR_3)

{

    assert(VAR_3 >= 0);

    bdrv_emit_qmp_error_event(VAR_0, QEVENT_BLOCK_IO_ERROR, VAR_1, VAR_2);

    if (VAR_1 == BDRV_ACTION_STOP) {

        vm_stop(RUN_STATE_IO_ERROR);

        bdrv_iostatus_set_err(VAR_0, VAR_3);

    }

}

void FUNC_0(BlockDriverState *VAR_0, BlockErrorAction VAR_1,
bool VAR_2, int VAR_3)
{ assert(VAR_3 >= 0); bdrv_emit_qmp_error_event(VAR_0, QEVENT_BLOCK_IO_ERROR, VAR_1, VAR_2); if (VAR_1 == BDRV_ACTION_STOP) { vm_stop(RUN_STATE_IO_ERROR); bdrv_iostatus_set_err(VAR_0, VAR_3); } }