[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v5 4/4] qemu-img: copy *key-secret opts when ope
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v5 4/4] qemu-img: copy *key-secret opts when opening newly created files |
Date: |
Wed, 26 Apr 2017 21:37:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 |
On 24.04.2017 11:16, Daniel P. Berrange wrote:
> The qemu-img dd/convert commands will create a image file and
> then try to open it. Historically it has been possible to open
> new files without passing any options. With encrypted files
> though, the *key-secret options are mandatory, so we need to
> provide those options when opening the newly created file.
>
> Reviewed-by: Eric Blake <address@hidden>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> qemu-img.c | 41 +++++++++++++++++++++++++++++++++++------
> 1 file changed, 35 insertions(+), 6 deletions(-)
>
> diff --git a/qemu-img.c b/qemu-img.c
> index 2344e64..cee28db 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c
[...]
> @@ -2303,8 +2332,8 @@ static int img_convert(int argc, char **argv)
> * That has to wait for bdrv_create to be improved
> * to allow filenames in option syntax
> */
> - out_blk = img_open_file(out_filename, out_fmt,
> - flags, writethrough, quiet);
> + out_blk = img_open_new_file(out_filename, opts, out_fmt,
> + flags, writethrough, quiet> }
> if (!out_blk) {> ret = -1;
With the spelling fixed as pointed out by Fam, and with
s/out_blk/s.target/ in this hunk:
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v5 0/4] Improve convert and dd commands, Daniel P. Berrange, 2017/04/24
- [Qemu-block] [PATCH v5 1/4] qemu-img: add support for --object with 'dd' command, Daniel P. Berrange, 2017/04/24
- [Qemu-block] [PATCH v5 2/4] qemu-img: fix --image-opts usage with dd command, Daniel P. Berrange, 2017/04/24
- [Qemu-block] [PATCH v5 3/4] qemu-img: introduce --target-image-opts for 'convert' command, Daniel P. Berrange, 2017/04/24
- [Qemu-block] [PATCH v5 4/4] qemu-img: copy *key-secret opts when opening newly created files, Daniel P. Berrange, 2017/04/24
- Re: [Qemu-block] [PATCH v5 0/4] Improve convert and dd commands, Fam Zheng, 2017/04/24