[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/8] block: bdrv_img_create(): add param_list ar
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 2/8] block: bdrv_img_create(): add param_list argument |
Date: |
Thu, 18 Oct 2012 13:57:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
Am 17.10.2012 21:35, schrieb Luiz Capitulino:
> If set returns a copy of the parameter list used by the block driver
> to create the new image.
>
> Signed-off-by: Luiz Capitulino <address@hidden>
> ---
> block.c | 7 ++++++-
> block.h | 3 ++-
> blockdev.c | 2 +-
> qemu-img.c | 2 +-
> 4 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/block.c b/block.c
> index e95f613..254a5c2 100644
> --- a/block.c
> +++ b/block.c
> @@ -4294,7 +4294,8 @@ bdrv_acct_done(BlockDriverState *bs, BlockAcctCookie
> *cookie)
>
> int bdrv_img_create(const char *filename, const char *fmt,
> const char *base_filename, const char *base_fmt,
> - char *options, uint64_t img_size, int flags)
> + char *options, uint64_t img_size, int flags,
> + QEMUOptionParameter **param_list)
> {
> QEMUOptionParameter *param = NULL, *create_options = NULL;
> QEMUOptionParameter *backing_fmt, *backing_file, *size;
> @@ -4430,6 +4431,10 @@ int bdrv_img_create(const char *filename, const char
> *fmt,
> }
>
> out:
> + if (param_list && ret == 0) {
> + *param_list = append_option_parameters(NULL, param);
> + }
If you put this above the out: label, the ret == 0 check wouldn't be
necessary.
Kevin
[Qemu-devel] [PATCH 1/8] error: add error_set_errno and error_setg_errno, Luiz Capitulino, 2012/10/17
[Qemu-devel] [PATCH 4/8] block: bdrv_img_create(): add Error ** argument, Luiz Capitulino, 2012/10/17
[Qemu-devel] [PATCH 3/8] block: bdrv_img_create(): move parameter list printing to qemu-img, Luiz Capitulino, 2012/10/17