From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB1bL-0002ze-BR for qemu-devel@nongnu.org; Mon, 10 Sep 2012 06:52:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TB1bB-0002oh-OK for qemu-devel@nongnu.org; Mon, 10 Sep 2012 06:52:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB1bB-0002oJ-GF for qemu-devel@nongnu.org; Mon, 10 Sep 2012 06:52:13 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8AAqBcF020263 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 10 Sep 2012 06:52:11 -0400 Date: Mon, 10 Sep 2012 11:52:07 +0100 From: "Daniel P. Berrange" Message-ID: <20120910105207.GG16417@redhat.com> References: <1346434010-14801-1-git-send-email-berrange@redhat.com> <5040F4B9.50509@redhat.com> <50460EFC.7010803@redhat.com> <504DC4A4.4030807@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <504DC4A4.4030807@redhat.com> Subject: Re: [Qemu-devel] [PATCH] Don't require encryption password for 'qemu-img info' command Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Eric Blake , qemu-devel@nongnu.org On Mon, Sep 10, 2012 at 12:44:52PM +0200, Kevin Wolf wrote: > Am 04.09.2012 16:23, schrieb Kevin Wolf: > > Am 31.08.2012 19:30, schrieb Eric Blake: > >> On 08/31/2012 10:26 AM, Daniel P. Berrange wrote: > >>> From: "Daniel P. Berrange" > >>> > >>> The encryption password is only required if I/O is going to be > >>> performed on a disk image. The 'qemu-img info' command merely > >>> reports metadata, so it should not ask for a decryption password > >>> > >>> Signed-off-by: Daniel P. Berrange > >>> --- > >>> qemu-img.c | 21 +++++++++++---------- > >>> 1 file changed, 11 insertions(+), 10 deletions(-) > >>> > >>> diff --git a/qemu-img.c b/qemu-img.c > >>> index b41e670..3dd4ec7 100644 > >>> --- a/qemu-img.c > >>> +++ b/qemu-img.c > >>> @@ -221,7 +221,8 @@ static int print_block_option_help(const char *filename, const char *fmt) > >>> > >>> static BlockDriverState *bdrv_new_open(const char *filename, > >>> const char *fmt, > >>> - int flags) > >>> + int flags, > >>> + int requireIO) > >> > >> Since you only pass 0 or 1 for requireIO, why not make it bool? > > > > Yes, please. bool require_io, to be precise. The qemu coding style > > doesn't use camelCase here. > > > >> For > >> that matter, why not make it part of 'flags', where the default is to > >> require decryption, and a new flag BDV_O_NO_IO can be added when opening > >> an image for no I/O and used to avoid the decryption? > > > > Because the block layer isn't really interested in it, this should be > > kept inside qemu-img. > > Oh, Dan, seems you've been dropped from the CC list somehow. Are you > going to send a v2? Yes, I'll send an update soon. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|