static int del_existing_snapshots(Monitor *mon, const char *name)

{

    BlockDriverState *bs;

    QEMUSnapshotInfo sn1, *snapshot = &sn1;

    int ret;



    bs = NULL;

    while ((bs = bdrv_next(bs))) {

        if (bdrv_can_snapshot(bs) &&

            bdrv_snapshot_find(bs, snapshot, name) >= 0)

        {

            ret = bdrv_snapshot_delete(bs, name);

            if (ret < 0) {

                monitor_printf(mon,

                               "Error while deleting snapshot on '%s'\n",

                               bdrv_get_device_name(bs));

                return -1;

            }

        }

    }



    return 0;

}

static int del_existing_snapshots(Monitor *mon, const char *name)

{

    BlockDriverState *bs;

    QEMUSnapshotInfo sn1, *snapshot = &sn1;

    int ret;



    bs = NULL;

    while ((bs = bdrv_next(bs))) {

        if (bdrv_can_snapshot(bs) &&

            bdrv_snapshot_find(bs, snapshot, name) >= 0)

        {

            ret = bdrv_snapshot_delete(bs, name);

            if (ret < 0) {

                monitor_printf(mon,

                               "Error while deleting snapshot on '%s'\n",

                               bdrv_get_device_name(bs));

                return -1;

            }

        }

    }



    return 0;

}

    int ret;             ret = bdrv_snapshot_delete(bs, name);             if (ret < 0) {                                "Error while deleting snapshot on '%s'\n",                                bdrv_get_device_name(bs));     int ret;             if (ret < 0) {
static int FUNC_0(Monitor *VAR_0, const char *VAR_1)

{

    BlockDriverState *bs;

    QEMUSnapshotInfo sn1, *snapshot = &sn1;

    int VAR_2;



    bs = NULL;

    while ((bs = bdrv_next(bs))) {

        if (bdrv_can_snapshot(bs) &&

            bdrv_snapshot_find(bs, snapshot, VAR_1) >= 0)

        {

            VAR_2 = bdrv_snapshot_delete(bs, VAR_1);

            if (VAR_2 < 0) {

                monitor_printf(VAR_0,

                               "Error while deleting snapshot on '%s'\n",

                               bdrv_get_device_name(bs));

                return -1;

            }

        }

    }



    return 0;

}

static int FUNC_0(Monitor *VAR_0, const char *VAR_1)
{ BlockDriverState *bs; QEMUSnapshotInfo sn1, *snapshot = &sn1; int VAR_2; bs = NULL; while ((bs = bdrv_next(bs))) { if (bdrv_can_snapshot(bs) &&
bdrv_snapshot_find(bs, snapshot, VAR_1) >= 0)
{ VAR_2 = bdrv_snapshot_delete(bs, VAR_1); if (VAR_2 < 0) { monitor_printf(VAR_0,
"Error while deleting snapshot on '%s'\n",
bdrv_get_device_name(bs)); return -1; } } } return 0; }