[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] QEMUSizedBuffer based QEMUFile
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] QEMUSizedBuffer based QEMUFile |
Date: |
Wed, 06 Aug 2014 12:56:37 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
On 08/06/2014 11:30 AM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> This is based on Stefan and Joel's patch that creates a QEMUFile that goes
> to a memory buffer; from:
>
> http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html
>
> Using the QEMUFile interface, this patch adds support functions for
> operating on in-memory sized buffers that can be written to or read from.
>
> Signed-off-by: Stefan Berger <address@hidden>
> Signed-off-by: Joel Schopp <address@hidden>
>
> For minor tweeks/rebase I've done to it:
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
> ---
> include/migration/qemu-file.h | 28 +++
> include/qemu/typedefs.h | 1 +
> qemu-file.c | 410
> ++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 439 insertions(+)
> +/**
> + * Set the length of the buffer; the primary usage of this
> + * function is to truncate the number of used bytes in the buffer.
> + * The size will not be extended beyond the current number of
> + * allocated bytes in the QEMUSizedBuffer.
> + *
> + * @qsb: A QEMUSizedBuffer
> + * @new_len : The new length of bytes in the buffer
No space before :
> +/*
> + * Convert the QEMUSizedBuffer into a flat buffer.
> + *
> + * Note: If at all possible, try to avoid this function since it
> + * may unnecessarily copy memory around.
> + *
> + * @qsb: pointer to QEMUSizedBuffer
> + * @start : offset to start at
and again
> + * @count: number of bytes to copy
> + * @buf: a pointer to an optional buffer to write into; the pointer may
> + * point to NULL in which case the buffer will be allocated;
> + * if buffer is provided, it must be large enough to hold @count bytes
> + *
> + * Returns the number of bytes copied into the output buffer
spurious double space
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature