From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCRhS-0002Et-3x for qemu-devel@nongnu.org; Mon, 04 Mar 2013 04:28:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCRhN-0005ad-MV for qemu-devel@nongnu.org; Mon, 04 Mar 2013 04:28:50 -0500 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:39244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCRhN-0005aW-Gj for qemu-devel@nongnu.org; Mon, 04 Mar 2013 04:28:45 -0500 Received: by mail-we0-f169.google.com with SMTP id t11so4538052wey.28 for ; Mon, 04 Mar 2013 01:28:44 -0800 (PST) Date: Mon, 4 Mar 2013 10:28:42 +0100 From: Stefan Hajnoczi Message-ID: <20130304092842.GA2021@stefanha-thinkpad.redhat.com> References: <1362168821-25668-1-git-send-email-kwolf@redhat.com> <1362168821-25668-5-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1362168821-25668-5-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH 4/7] block: Add options QDict to bdrv_open_common() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com On Fri, Mar 01, 2013 at 09:13:38PM +0100, Kevin Wolf wrote: > diff --git a/block.c b/block.c > index bf93dd1..e0e3b99 100644 > --- a/block.c > +++ b/block.c > @@ -665,15 +665,18 @@ static int bdrv_open_flags(BlockDriverState *bs, int flags) > > /* > * Common part for opening disk images and files > + * > + * Removes all processed options from *options. > */ > static int bdrv_open_common(BlockDriverState *bs, BlockDriverState *file, > - const char *filename, > + const char *filename, QDict *options, The function already has an "options" local variable which will shadow: /* For snapshot=on, create a temporary qcow2 overlay */ if (flags & BDRV_O_SNAPSHOT) { BlockDriverState *bs1; int64_t total_size; int is_protocol = 0; BlockDriver *bdrv_qcow2; QEMUOptionParameter *options; This could be fixed in a follow-up patch. Stefan