On 06/06/2012 10:51 PM, Anthony Liguori wrote:

>> Of course, being able to support hex from QMP would be a nice feature,
>> but I'm not sure how to add it in.
> 
> Why is it a nice feature?

Because libvirt already allows users to pass in integers instead of
symbolic names.  Providing integer support in QMP would let the path be
passthrough, instead of libvirt doing a reverse lookup to convert
integer to symbol just to call QMP for qemu to do a lookup from symbol
back to integer.

> 
> I don't quite understand why anyone would want to use hex actually... 
> You would have to convert from whatever symbolic code you're using to
> QEMU's hex value so why not just stay in symbolic representation.

Staying just symbolic is fine - remember, I already stated that libvirt
already has a lookup table to convert between several different keycode
sets already, and Dan Berrange has already proposed sharing that table
with qemu.  And settling on symbolic as the only interface, even if it
is less efficient than integer passthrough, is at least easier to maintain.

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to