qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 7/8] util: add iterators for QemuOpts values


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 7/8] util: add iterators for QemuOpts values
Date: Tue, 24 Jan 2017 12:58:20 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 01/24/2017 03:53 AM, Daniel P. Berrange wrote:
> To iterate over all QemuOpts currently requires using a callback
> function which is inconvenient for control flow. Add support for
> using iterator functions more directly
> 
>   QemuOptsIter iter;
>   QemuOpt *opt;
> 
>   qemu_opts_iter_init(&iter, opts, "repeated-key");
>   while ((opt = qemu_opts_iter_next(&iter)) != NULL) {
>       ....do something...
>   }
> 
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
>  include/qemu/option.h |  9 +++++++++
>  util/qemu-option.c    | 19 +++++++++++++++++++
>  2 files changed, 28 insertions(+)
> 

Reviewed-by: Eric Blake <address@hidden>

-- 
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

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