qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v2 1/6] bdrv: Use "Error" for opening images


From: Kevin Wolf
Subject: Re: [Qemu-devel] [RFC v2 1/6] bdrv: Use "Error" for opening images
Date: Fri, 6 Sep 2013 15:08:36 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 05.09.2013 um 15:55 hat Max Reitz geschrieben:
> Add an Error ** parameter to BlockDriver.bdrv_open and
> BlockDriver.bdrv_file_open to allow more specific error messages.
> 
> Signed-off-by: Max Reitz <address@hidden>

> diff --git a/block/raw_bsd.c b/block/raw_bsd.c
> index ab2b0fd..793121a 100644
> --- a/block/raw_bsd.c
> +++ b/block/raw_bsd.c
> @@ -130,12 +130,14 @@ static int raw_has_zero_init(BlockDriverState *bs)
>      return bdrv_has_zero_init(bs->file);
>  }
>  
> -static int raw_create(const char *filename, QEMUOptionParameter *options)
> +static int raw_create(const char *filename, QEMUOptionParameter *options,
> +                      Error **errp)
>  {
>      return bdrv_create_file(filename, options);
>  }
>  
> -static int raw_open(BlockDriverState *bs, QDict *options, int flags)
> +static int raw_open(BlockDriverState *bs, QDict *options, int flags,
> +                    Error **errp)
>  {
>      bs->sg = bs->file->sg;
>      return 0;

raw_create() shouldn't be converted in this patch, this causes a build
failure.

Kevin



reply via email to

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