qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Pavel Hrdina <phrdina@redhat.com>
Cc: kwolf@redhat.com, lcapitulino@redhat.com, qemu-devel@nongnu.org,
	armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb()
Date: Wed, 5 Jun 2013 15:23:17 +0200	[thread overview]
Message-ID: <20130605132317.GF31478@stefanha-thinkpad.muc.redhat.com> (raw)
In-Reply-To: <efebd1409316dc6bf2c1fc10a4b933955a6c38e9.1369841836.git.phrdina@redhat.com>

On Wed, May 29, 2013 at 06:18:19PM +0200, Pavel Hrdina wrote:
> @@ -1071,14 +1072,18 @@ static void qmp_bdrv_open_encrypted(BlockDriverState *bs, const char *filename,
>          if (password) {
>              if (bdrv_set_key(bs, password) < 0) {
>                  error_set(errp, QERR_INVALID_PASSWORD);
> +                return;
>              }
>          } else {
>              error_set(errp, QERR_DEVICE_ENCRYPTED, bdrv_get_device_name(bs),
>                        bdrv_get_encrypted_filename(bs));
> +            return;
>          }
>      } else if (password) {
>          error_set(errp, QERR_DEVICE_NOT_ENCRYPTED, bdrv_get_device_name(bs));
>      }
> +
> +    bdrv_dev_change_media_cb(bs, true);
>  }

Calling bdrv_dev_change_media_cb() after raising
QERR_DEVICE_NOT_ENCRYPTED is intentional?  It might warrant a comment.

  reply	other threads:[~2013-06-05 13:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 16:18 [Qemu-devel] [PATCH v2 0/2] block: fix spurious DEVICE_TRAY_MOVED events on shutdown Pavel Hrdina
2013-05-29 16:18 ` [Qemu-devel] [PATCH v2 1/2] block: make bdrv_dev_change_media_cb() public Pavel Hrdina
2013-05-29 16:18 ` [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb() Pavel Hrdina
2013-06-05 13:23   ` Stefan Hajnoczi [this message]
2013-06-17  9:46     ` Pavel Hrdina
2013-06-17 12:33       ` Stefan Hajnoczi
2013-06-17 13:22         ` Luiz Capitulino
2013-06-17 13:25           ` Pavel Hrdina
2013-06-17 13:32             ` Luiz Capitulino
2013-06-17 13:38               ` Pavel Hrdina
2013-06-17 13:46                 ` Luiz Capitulino
2013-06-17 13:46                 ` Kevin Wolf
2013-06-17 13:51                   ` Luiz Capitulino
2013-06-17 14:49                     ` Kevin Wolf
2013-06-17 14:59                       ` Luiz Capitulino
2013-06-17 15:16                         ` Kevin Wolf
2013-06-18  6:26                           ` Pavel Hrdina
2013-05-30 15:51 ` [Qemu-devel] [PATCH v2 0/2] block: fix spurious DEVICE_TRAY_MOVED events on shutdown Luiz Capitulino

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=20130605132317.GF31478@stefanha-thinkpad.muc.redhat.com \
    --to=stefanha@gmail.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=phrdina@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).