From 6cc2a4157b31c47303da96c5ed7836db3c10def6 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 6 Mar 2012 18:55:59 +0100 Subject: qmp: convert blockdev-snapshot-sync to a wrapper around transactions Simplify the blockdev-snapshot-sync code and gain failsafe operation by turning it into a wrapper around the new transaction command. A new option is also added matching "mode". Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hmp-commands.hx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'hmp-commands.hx') diff --git a/hmp-commands.hx b/hmp-commands.hx index ed88877..6980214 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -882,14 +882,17 @@ ETEXI { .name = "snapshot_blkdev", - .args_type = "device:B,snapshot-file:s?,format:s?", - .params = "device [new-image-file] [format]", + .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?", + .params = "[-n] device [new-image-file] [format]", .help = "initiates a live snapshot\n\t\t\t" "of device. If a new image file is specified, the\n\t\t\t" "new image file will become the new root image.\n\t\t\t" "If format is specified, the snapshot file will\n\t\t\t" "be created in that format. Otherwise the\n\t\t\t" - "snapshot will be internal! (currently unsupported)", + "snapshot will be internal! (currently unsupported).\n\t\t\t" + "The default format is qcow2. The -n flag requests QEMU\n\t\t\t" + "to reuse the image found in new-image-file, instead of\n\t\t\t" + "recreating it from scratch.", .mhandler.cmd = hmp_snapshot_blkdev, }, -- cgit v1.1