From 8c116b0e4141400f8d43a7e6dac8ff3adcc8aadd Mon Sep 17 00:00:00 2001 From: Wenchao Xia Date: Wed, 4 Dec 2013 17:10:55 +0800 Subject: qemu-nbd: support internal snapshot export Now it is possible to directly export an internal snapshot, which can be used to probe the snapshot's contents without qemu-img convert. Signed-off-by: Wenchao Xia Signed-off-by: Stefan Hajnoczi --- block/snapshot.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'block/snapshot.c') diff --git a/block/snapshot.c b/block/snapshot.c index 565222e24a..9047f8ddc9 100644 --- a/block/snapshot.c +++ b/block/snapshot.c @@ -25,6 +25,24 @@ #include "block/snapshot.h" #include "block/block_int.h" +QemuOptsList internal_snapshot_opts = { + .name = "snapshot", + .head = QTAILQ_HEAD_INITIALIZER(internal_snapshot_opts.head), + .desc = { + { + .name = SNAPSHOT_OPT_ID, + .type = QEMU_OPT_STRING, + .help = "snapshot id" + },{ + .name = SNAPSHOT_OPT_NAME, + .type = QEMU_OPT_STRING, + .help = "snapshot name" + },{ + /* end of list */ + } + }, +}; + int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info, const char *name) { -- cgit v1.2.3