From 6106e2492fe0080ad85d4862dec9c3bebc57b2f0 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Fri, 25 Nov 2011 16:15:19 -0200 Subject: qapi: Convert blockdev_snapshot_sync Unfortunately, this conversion required an additional change. In the old QMP command, the 'snapshot-file' argument is specified as optional. The idea is to take the snapshot internally if 'snapshot-file' is not passed. However, internal snapshots are not supported yet so the command returns a MissingParamater error if 'snapshot-file' is not passed. Which makes the argument actually required and will cause compatibility breakage if we change that in the future. To fix this the QAPI converted blockdev_snapshot_sync command makes the 'snapshot-file' argument required. Again, in practice it's actually required, so this is not incompatible. If we do implement internal snapshots someday, we'll need a new argument for it. Note that this discussion doesn't affect HMP. Signed-off-by: Luiz Capitulino --- qmp-commands.hx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index 721b157..9d68206 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -665,10 +665,8 @@ EQMP { .name = "blockdev-snapshot-sync", - .args_type = "device:B,snapshot-file:s?,format:s?", - .params = "device [new-image-file] [format]", - .user_print = monitor_user_noop, - .mhandler.cmd_new = do_snapshot_blkdev, + .args_type = "device:B,snapshot-file:s,format:s?", + .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync, }, SQMP -- cgit v1.1