int bdrv_all_goto_snapshot(const char *name, BlockDriverState **first_bad_bs)

{

    int err = 0;

    BlockDriverState *bs;

    BdrvNextIterator *it = NULL;



    while (err == 0 && (it = bdrv_next(it, &bs))) {

        AioContext *ctx = bdrv_get_aio_context(bs);



        aio_context_acquire(ctx);

        if (bdrv_can_snapshot(bs)) {

            err = bdrv_snapshot_goto(bs, name);

        }

        aio_context_release(ctx);

    }



    *first_bad_bs = bs;

    return err;

}

int bdrv_all_goto_snapshot(const char *name, BlockDriverState **first_bad_bs)

{

    int err = 0;

    BlockDriverState *bs;

    BdrvNextIterator *it = NULL;



    while (err == 0 && (it = bdrv_next(it, &bs))) {

        AioContext *ctx = bdrv_get_aio_context(bs);



        aio_context_acquire(ctx);

        if (bdrv_can_snapshot(bs)) {

            err = bdrv_snapshot_goto(bs, name);

        }

        aio_context_release(ctx);

    }



    *first_bad_bs = bs;

    return err;

}

    BdrvNextIterator *it = NULL;     BdrvNextIterator *it = NULL;     BdrvNextIterator *it = NULL;     BlockDriverState *bs;     BdrvNextIterator *it = NULL;     BdrvNextIterator *it = NULL;     BdrvNextIterator *it = NULL;     BdrvNextIterator *it = NULL;     while (err == 0 && (it = bdrv_next(it, &bs))) {     BdrvNextIterator *it = NULL;     while (err == 0 && (it = bdrv_next(it, &bs))) {     BdrvNextIterator *it = NULL;     while (err == 0 && (it = bdrv_next(it, &bs))) {     BdrvNextIterator *it = NULL;     BdrvNextIterator *it = NULL;     BdrvNextIterator *it = NULL;     BdrvNextIterator *it = NULL;
int FUNC_0(const char *VAR_0, BlockDriverState **VAR_1)

{

    int VAR_2 = 0;

    BlockDriverState *bs;

    BdrvNextIterator *it = NULL;



    while (VAR_2 == 0 && (it = bdrv_next(it, &bs))) {

        AioContext *ctx = bdrv_get_aio_context(bs);



        aio_context_acquire(ctx);

        if (bdrv_can_snapshot(bs)) {

            VAR_2 = bdrv_snapshot_goto(bs, VAR_0);

        }

        aio_context_release(ctx);

    }



    *VAR_1 = bs;

    return VAR_2;

}

int FUNC_0(const char *VAR_0, BlockDriverState **VAR_1)
{ int VAR_2 = 0; BlockDriverState *bs; BdrvNextIterator *it = NULL; while (VAR_2 == 0 && (it = bdrv_next(it, &bs))) { AioContext *ctx = bdrv_get_aio_context(bs); aio_context_acquire(ctx); if (bdrv_can_snapshot(bs)) { VAR_2 = bdrv_snapshot_goto(bs, VAR_0); } aio_context_release(ctx); } *VAR_1 = bs; return VAR_2; }