qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] QEMUSizedBuffer based QEMUFile


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH 1/2] QEMUSizedBuffer based QEMUFile
Date: Thu, 7 Aug 2014 11:25:37 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

* Eric Blake (address@hidden) wrote:
> 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(+)

Spaces fixed in v2.

Dave

> 
> > +/**
> > + * 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
> 


--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

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