qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Don't require encryption password for 'qemu-img


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] Don't require encryption password for 'qemu-img info' command
Date: Fri, 31 Aug 2012 10:30:33 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 08/31/2012 10:26 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <address@hidden>
> 
> 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 <address@hidden>
> ---
>  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?  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?

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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