2 ===================================================================
3 --- new.orig/block.c 2013-02-12 12:05:14.000000000 +0100
4 +++ new/block.c 2013-02-12 12:06:52.000000000 +0100
9 +int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info,
12 + QEMUSnapshotInfo *sn_tab, *sn;
16 + nb_sns = bdrv_snapshot_list(bs, &sn_tab);
19 + for(i = 0; i < nb_sns; i++) {
21 + if (!strcmp(sn->id_str, name) || !strcmp(sn->name, name)) {
31 int bdrv_snapshot_load_tmp(BlockDriverState *bs,
32 const char *snapshot_name)
34 Index: new/include/block/block.h
35 ===================================================================
36 --- new.orig/include/block/block.h 2013-02-12 12:05:14.000000000 +0100
37 +++ new/include/block/block.h 2013-02-12 12:06:52.000000000 +0100
39 int bdrv_snapshot_delete(BlockDriverState *bs, const char *snapshot_id);
40 int bdrv_snapshot_list(BlockDriverState *bs,
41 QEMUSnapshotInfo **psn_info);
42 +int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info,
44 int bdrv_snapshot_load_tmp(BlockDriverState *bs,
45 const char *snapshot_name);
46 char *bdrv_snapshot_dump(char *buf, int buf_size, QEMUSnapshotInfo *sn);
48 ===================================================================
49 --- new.orig/savevm.c 2013-02-12 12:05:14.000000000 +0100
50 +++ new/savevm.c 2013-02-12 12:06:52.000000000 +0100
51 @@ -2055,28 +2055,6 @@
55 -static int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info,
58 - QEMUSnapshotInfo *sn_tab, *sn;
62 - nb_sns = bdrv_snapshot_list(bs, &sn_tab);
65 - for(i = 0; i < nb_sns; i++) {
67 - if (!strcmp(sn->id_str, name) || !strcmp(sn->name, name)) {
78 * Deletes snapshots of a given name in all opened images.