qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v27 07/33] QemuOpts: add qemu_opt_get_*_del func


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v27 07/33] QemuOpts: add qemu_opt_get_*_del functions for replace work
Date: Wed, 4 Jun 2014 10:54:36 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, May 07, 2014 at 05:58:32PM +0800, Chunyan Liu wrote:
> diff --git a/util/qemu-option.c b/util/qemu-option.c
> index 4d2d4d1..32e1d50 100644
> --- a/util/qemu-option.c
> +++ b/util/qemu-option.c
> @@ -575,6 +575,19 @@ static void qemu_opt_del(QemuOpt *opt)
>      g_free(opt);
>  }
>  
> +/* qemu_opt_set allows many settings for the same option.
> + * This function deletes all settings for an option.
> + */
> +static void qemu_opt_del_all(QemuOpts *opts, const char *name)
> +{
> +    QemuOpt *opt, *next_opt;
> +
> +    QTAILQ_FOREACH_SAFE(opt, &opts->head, next, next_opt) {
> +        if (!strcmp(opt->name, name))
> +            qemu_opt_del(opt);

QEMU coding style always uses curlies, even when the if body is only one
statement.  Please use scripts/checkpatch.pl to scan your patches before
they are sent.

I can fix this up while merging.  No need to resend.



reply via email to

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