From 93a0c1e72c22c457eb44f25834e3bc762b5fa456 Mon Sep 17 00:00:00 2001
Message-Id: <93a0c1e72c22c457eb44f25834e3bc762b5fa456.1334770230.git.minovotn@redhat.com>
In-Reply-To: <5e4659718c6d6ee9ab11b269d929a292a71b3ab0.1334770230.git.minovotn@redhat.com>
References: <5e4659718c6d6ee9ab11b269d929a292a71b3ab0.1334770230.git.minovotn@redhat.com>
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 13 Apr 2012 16:23:28 +0200
Subject: [PATCH 02/18] use hyphens in streaming commands to indicate async
 cancel support

RH-Author: Paolo Bonzini <pbonzini@redhat.com>
Message-id: <1334334209-30965-1-git-send-email-pbonzini@redhat.com>
Patchwork-id: 39209
O-Subject: [RHEL 6.3 qemu-kvm PATCH] use hyphens in streaming commands to indicate async cancel support
Bugzilla: 812085
RH-Acked-by: Eric Blake <eblake@redhat.com>
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>

Bugzilla: 812085

Upstream: Submitted

Brew build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=4294270

libvirt uses the underscore vs. hyphen difference to distinguish RHEL6.2
and RHEL6.3 implementations of streaming.  It expects that all three
commands are changed as a group.  Either we have the old synchronous
cancel interface with no partial streaming:

   block_job_set_speed
   block_job_cancel
   block_stream

or we have the new asynchronous cancel interface and partial streaming:

   block-job-set-speed
   block-job-cancel
   block-stream

Compared to upstream, RHEL6 has documentation in qemu-monitor.hx.
The documentation happened to have a misspelled command.  I sent
upstream also the patch to fix the misspelling in hmp-commands.hx.
---
 qemu-monitor.hx |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 qemu-monitor.hx |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 5b1eeb9..52b92ed 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -2136,7 +2136,7 @@ Example:
 EQMP
 
     {
-        .name       = "block_stream",
+        .name       = "block-stream",
         .args_type  = "device:B,base:s?",
         .params     = "device [base]",
         .help       = "background copy backing file into a block device",
@@ -2145,7 +2145,7 @@ EQMP
     },
 
 SQMP
-block_stream
+block-stream
 ------------
 
 Copy data from a backing file into a block device.
@@ -2154,7 +2154,7 @@ The block streaming operation is performed in the background until the entire
 backing file has been copied.  This command returns immediately once streaming
 has started.  The status of ongoing block streaming operations can be checked
 with query-block-jobs.  The operation can be stopped before it has completed
-using the block_job_cancel command.
+using the block-job-cancel command.
 
 If a base file is specified then sectors are not copied from that base file and
 its backing chain.  When streaming completes the image file will have the base
@@ -2180,7 +2180,7 @@ If base does not exist, BaseNotFound
 EQMP
 
     {
-        .name       = "block_job_set_speed",
+        .name       = "block-job-set-speed",
         .args_type  = "device:B,value:o",
         .params     = "device value",
         .help       = "set maximum speed for a background block operation",
@@ -2189,13 +2189,13 @@ EQMP
     },
 
 STEXI
-@item block_job_set_stream
-@findex block_job_set_stream
+@item block-job-set-speed
+@findex block-job-set-speed
 Set maximum speed for a background block operation.
 ETEXI
 
 SQMP
-block_job_set_speed
+block-job-set-speed
 -------------------
 
 Set maximum speed for a background block operation.
@@ -2217,12 +2217,12 @@ If streaming is not active on this device, DeviceNotActive
 
 Example:
 
--> { "execute": "block_job_set_speed",
+-> { "execute": "block-job-set-speed",
     "arguments": { "device": "virtio0", "value": 1024 } }
 EQMP
 
     {
-        .name       = "block_job_cancel",
+        .name       = "block-job-cancel",
         .args_type  = "device:B",
         .params     = "device",
         .help       = "stop an active block streaming operation",
@@ -2231,13 +2231,13 @@ EQMP
     },
 
 STEXI
-@item block_job_cancel
-@findex block_job_cancel
+@item block-job-cancel
+@findex block-job-cancel
 Stop an active block streaming operation.
 ETEXI
 
 SQMP
-block_job_cancel
+block-job-cancel
 ----------------
 
 Stop an active block streaming operation.
-- 
1.7.7.6

