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

Re: [libvirt] handle different version of QEMU

On 08/05/2014 10:14 AM, Matthias Gatto wrote:
> Hello,
> I'm implementing the "new" QEMU option of
> block_set_io_throttle(@bps_max, @bps_rd_max...), but i have a problem:
> The old version of QEMU(before 1.7) does not handle it, so I'd like to
> know what function should i use to know the version of QEMU, and
> what's the proper way to handle this problem ?

Look at src/qemu/qemu_capabilities.c for how we discover other
capabilities. You'll have to find some way to force QMP introspection to
reveal whether you are dealing with old or new qemu.  Are you targetting
a new command line option (look at virQEMUCapsCommandLine) or a new QMP
command (look at virQEMUCapsCommands), or new optional arguments to
existing QMP commands (tougher, since QMP doesn't necessarily have
introspection yet) or something else?  I'm not quite clear based on your
description what you are trying to add support for.

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

Attachment: signature.asc
Description: OpenPGP digital signature

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