qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 13/15] qmp: qmp_send_key(): accept key codes in h


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PULL 13/15] qmp: qmp_send_key(): accept key codes in hex
Date: Fri, 28 Sep 2012 10:30:17 -0300

On Fri, 28 Sep 2012 07:01:31 -0600
Eric Blake <address@hidden> wrote:

> On 09/28/2012 04:36 AM, Amos Kong wrote:
> > On 27/09/12 21:28, Luiz Capitulino wrote:
> >>
> > 
> > Sorry the delay review.
> > 
> 
> > 
> > hex isn't support when using qmp monitor.
> > 
> 
> >> +{ 'union': 'KeyValue',
> >> +  'data': {
> >> +    'number': 'int',
> > 
> > It's 'int' not hex format.
> 
> Indeed - I just re-read the JSON overview at http://www.json.org/, which
> is explicit that numbers are decimal only (no octal or hexadecimal
> support, and no support for a leading 0 except when the number is
> exactly 0).  [Serves me right for not realizing this aspect of JSON when
> I did my review earlier.]

Sorry if I wasn't clear or if my use of "hex" caused confusion, but
it's known that the only way of having an hex value on the wire is
to make it a string. As the base number we use on the wire is pretty
irrelevant (at least for this case) I don't see any issue here (actually,
for json this is pretty natural).

> I don't think this invalidates the QMP (libvirt already sends decimal,
> and wasn't planning on sending hex), but you DO have a point that:
> 
> > 
> > qmp-commands.hx also needs to be updated with latest examples:
> 
> Since this is already in the PULL request, I think the docs touchup
> could be a separate patch.

Yes.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]