aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorWenchao Xia <xiawenc@linux.vnet.ibm.com>2013-05-25 11:09:43 +0800
committerKevin Wolf <kwolf@redhat.com>2013-06-04 13:56:30 +0200
commitde08c606f9ddafe647b6843e2b10a6d6030b0fc0 (patch)
treeffeb4fe9e9b6e16a63cd143844f2710006243b93 /savevm.c
parent29d782710f87f01991bfc85cd9bef7d15280a5e2 (diff)
block: move snapshot code in block.c to block/snapshot.c
All snapshot related code, except bdrv_snapshot_dump() and bdrv_is_snapshot(), is moved to block/snapshot.c. bdrv_snapshot_dump() will be moved to another file later. bdrv_is_snapshot() is not related with internal snapshot. It also fixes small code style errors reported by check script. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/savevm.c b/savevm.c
index b11dbf6210..916080d7dc 100644
--- a/savevm.c
+++ b/savevm.c
@@ -40,6 +40,7 @@
#include "trace.h"
#include "qemu/bitops.h"
#include "qemu/iov.h"
+#include "block/snapshot.h"
#define SELF_ANNOUNCE_ROUNDS 5
@@ -2273,28 +2274,6 @@ static BlockDriverState *find_vmstate_bs(void)
return NULL;
}
-static int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info,
- const char *name)
-{
- QEMUSnapshotInfo *sn_tab, *sn;
- int nb_sns, i, ret;
-
- ret = -ENOENT;
- nb_sns = bdrv_snapshot_list(bs, &sn_tab);
- if (nb_sns < 0)
- return ret;
- for(i = 0; i < nb_sns; i++) {
- sn = &sn_tab[i];
- if (!strcmp(sn->id_str, name) || !strcmp(sn->name, name)) {
- *sn_info = *sn;
- ret = 0;
- break;
- }
- }
- g_free(sn_tab);
- return ret;
-}
-
/*
* Deletes snapshots of a given name in all opened images.
*/