qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/6 v11 v11] block: make some functions public


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 2/6 v11 v11] block: make some functions public
Date: Wed, 1 Aug 2012 15:01:37 +0100

On Tue, Jul 31, 2012 at 5:51 PM, Dong Xu Wang
<address@hidden> wrote:
> diff --git a/block.h b/block.h
> index c89590d..b523076 100644
> --- a/block.h
> +++ b/block.h
> @@ -152,6 +152,8 @@ int bdrv_pwrite(BlockDriverState *bs, int64_t offset,
>                  const void *buf, int count);
>  int bdrv_pwrite_sync(BlockDriverState *bs, int64_t offset,
>      const void *buf, int count);
> +int bdrv_read_string(BlockDriverState *file, uint64_t offset, size_t n,
> +                           char *buf, size_t buflen);

I suggest renaming the "file" argument to "bs" like all the other
block.h functions.

>  /**
> - * Read a string of known length from the image file
> - *
> - * @file:       Image file
> - * @offset:     File offset to start of string, in bytes
> - * @n:          String length in bytes
> - * @buf:        Destination buffer
> - * @buflen:     Destination buffer length in bytes
> - * @ret:        0 on success, -errno on failure
> - *
> - * The string is NUL-terminated.
> - */

Please keep the doc comment.

Stefan



reply via email to

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