[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V26 06/32] QemuOpts: move qemu_opt_del ahead for
From: |
Leandro Dorileo |
Subject: |
Re: [Qemu-devel] [PATCH V26 06/32] QemuOpts: move qemu_opt_del ahead for later calling |
Date: |
Thu, 1 May 2014 16:16:16 -0300 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Tue, Apr 29, 2014 at 05:08:15PM +0800, Chunyan Liu wrote:
> In later patch, qemu_opt_get_del functions will be added, they will
> first get the option value, then call qemu_opt_del to remove the option
> from opt list. To prepare for that purpose, move qemu_opt_del ahead first.
>
> Reviewed-by: Eric Blake <address@hidden>
> Signed-off-by: Chunyan Liu <address@hidden>
Reviewed-by: Leandro Dorileo <address@hidden>
> ---
> util/qemu-option.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/util/qemu-option.c b/util/qemu-option.c
> index 69cdf3f..4d2d4d1 100644
> --- a/util/qemu-option.c
> +++ b/util/qemu-option.c
> @@ -567,6 +567,14 @@ static QemuOpt *qemu_opt_find(QemuOpts *opts, const char
> *name)
> return NULL;
> }
>
> +static void qemu_opt_del(QemuOpt *opt)
> +{
> + QTAILQ_REMOVE(&opt->opts->head, opt, next);
> + g_free(opt->name);
> + g_free(opt->str);
> + g_free(opt);
> +}
> +
> const char *qemu_opt_get(QemuOpts *opts, const char *name)
> {
> QemuOpt *opt = qemu_opt_find(opts, name);
> @@ -661,14 +669,6 @@ static void qemu_opt_parse(QemuOpt *opt, Error **errp)
> }
> }
>
> -static void qemu_opt_del(QemuOpt *opt)
> -{
> - QTAILQ_REMOVE(&opt->opts->head, opt, next);
> - g_free(opt->name);
> - g_free(opt->str);
> - g_free(opt);
> -}
> -
> static bool opts_accepts_any(const QemuOpts *opts)
> {
> return opts->list->desc[0].name == NULL;
> --
> 1.8.4.5
>
>
--
Leandro Dorileo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH V26 06/32] QemuOpts: move qemu_opt_del ahead for later calling,
Leandro Dorileo <=