On 02/25/2015 12:04 AM, zhanghailiang wrote:

>>> +++ b/qmp-commands.hx
>>> @@ -753,6 +753,25 @@ Example:
>>>   EQMP
>>>
>>>       {
>>> +        .name       = "colo_lost_heartbeat",
>>
>> ...but documented incorrectly (this should use '-' to match the command
>> name in the .json file, not '_')
>>
> 
> Er, yes, you are right, here it should be 'colo-lost-heartbeat' in
> qmp-commands.hx,
> but 'colo_lost_heartbeat' in hmp-commands.hx, it is a little confused
> for me,
> why it should be like this?

Historical madness.  HMP has traditionally used '_' (and relied on
tab-completion to allow users to skip having to use the shift key),
while QMP has traditionally used '-' (in all but the oldest interfaces).

> 
> i will fix it.
> 
>>> +        .args_type  = "",
>>> +        .mhandler.cmd_new = qmp_marshal_input_colo_lost_heartbeat,
>>> +    },
>>> +
>>> +SQMP
>>> +colo_lost_heartbeat
>>> +--------------------
>>> +
>>> +Tell COLO that heartbeat is lost, a failover or takeover is needed.
>>> +
>>> +Example:
>>> +
>>> +-> { "execute": "colo_lost_heartbeat" }
>>> +<- { "return": {} }
>>
>> This example won't work unless you fix the spelling.
>>
> 
> Should here also be changed to 'colo-lost-heartbeat' ?

Yes.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to