qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Cc: armbru@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] block: Catch simultaneous usage of options and their aliases
Date: Thu, 18 Sep 2014 06:30:35 -0600	[thread overview]
Message-ID: <541AD06B.1070804@redhat.com> (raw)
In-Reply-To: <1411034263-18132-1-git-send-email-kwolf@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1345 bytes --]

On 09/18/2014 03:57 AM, Kevin Wolf wrote:
> While thinking about precedence of conflicting block device options from
> different sources, I noticed that you can specify both an option and its
> legacy alias at the same time (e.g. readonly=on,read-only=off). Rather
> than specifying the order of precedence, we should simply forbid such
> combinations.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  blockdev.c                 | 46 +++++++++++++++++++++++++++++++---------------
>  tests/qemu-iotests/051     | 23 +++++++++++++++++++++++
>  tests/qemu-iotests/051.out | 45 +++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 99 insertions(+), 15 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

>  
> -static void qemu_opt_rename(QemuOpts *opts, const char *from, const char *to)
> +static void qemu_opt_rename(QemuOpts *opts, const char *from, const char *to,
> +                            Error **errp)
>  {
>      const char *value;
>  
> +    if (*errp) {
> +        return;
> +    }

Not the most typical usage, so it might be worth a comment that this
function can be called with errp already set.  But since it's static,
it's not too hard to figure out as-is.

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

  reply	other threads:[~2014-09-18 12:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18  9:57 [Qemu-devel] [PATCH] block: Catch simultaneous usage of options and their aliases Kevin Wolf
2014-09-18 12:30 ` Eric Blake [this message]
2014-09-18 14:06   ` Markus Armbruster
2014-09-18 14:34     ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=541AD06B.1070804@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).