From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwZUc-0005KE-Pv for qemu-devel@nongnu.org; Wed, 01 Aug 2012 10:01:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwZUY-0003vh-Nx for qemu-devel@nongnu.org; Wed, 01 Aug 2012 10:01:42 -0400 Received: from mail-lpp01m010-f45.google.com ([209.85.215.45]:43093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwZUY-0003vK-FZ for qemu-devel@nongnu.org; Wed, 01 Aug 2012 10:01:38 -0400 Received: by lahc1 with SMTP id c1so4417460lah.4 for ; Wed, 01 Aug 2012 07:01:37 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1343753510-24661-2-git-send-email-wdongxu@linux.vnet.ibm.com> References: <1343753510-24661-1-git-send-email-wdongxu@linux.vnet.ibm.com> <1343753510-24661-2-git-send-email-wdongxu@linux.vnet.ibm.com> Date: Wed, 1 Aug 2012 15:01:37 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] [PATCH 2/6 v11 v11] block: make some functions public List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dong Xu Wang Cc: kwolf@redhat.com, qemu-devel@nongnu.org On Tue, Jul 31, 2012 at 5:51 PM, Dong Xu Wang 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