qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V3 02/11] block: add bdrv_get_filename() functio


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH V3 02/11] block: add bdrv_get_filename() function
Date: Mon, 14 Jan 2013 15:08:29 -0200

On Mon, 14 Jan 2013 15:09:38 +0800
Wenchao Xia <address@hidden> wrote:

>   This function will simply return the uri or filename used
> to open the image.
> 
> Reviewed-by: Eric Blake <address@hidden>
> Signed-off-by: Wenchao Xia <address@hidden>
> ---
>  block.c               |    5 +++++
>  include/block/block.h |    1 +
>  2 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/block.c b/block.c
> index 4e28c55..5f95da5 100644
> --- a/block.c
> +++ b/block.c
> @@ -2967,6 +2967,11 @@ BlockStatsList *qmp_query_blockstats(Error **errp)
>      return head;
>  }
>  
> +const char *bdrv_get_filename(BlockDriverState *bs)
> +{

bs can be const.

> +    return bs->filename;
> +}
> +
>  const char *bdrv_get_encrypted_filename(BlockDriverState *bs)
>  {
>      if (bs->backing_hd && bs->backing_hd->encrypted)
> diff --git a/include/block/block.h b/include/block/block.h
> index 0719339..a0fc2a6 100644
> --- a/include/block/block.h
> +++ b/include/block/block.h
> @@ -310,6 +310,7 @@ int bdrv_write_compressed(BlockDriverState *bs, int64_t 
> sector_num,
>                            const uint8_t *buf, int nb_sectors);
>  int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi);
>  
> +const char *bdrv_get_filename(BlockDriverState *bs);
>  const char *bdrv_get_encrypted_filename(BlockDriverState *bs);
>  void bdrv_get_backing_filename(BlockDriverState *bs,
>                                 char *filename, int filename_size);




reply via email to

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