qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: joel.schopp@amd.com, stefanb@linux.vnet.ibm.com,
	qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] QEMUSizedBuffer based QEMUFile
Date: Thu, 7 Aug 2014 11:25:37 +0100	[thread overview]
Message-ID: <20140807102536.GA2339@work-vm> (raw)
In-Reply-To: <53E27A65.2070500@redhat.com>

* Eric Blake (eblake@redhat.com) wrote:
> On 08/06/2014 11:30 AM, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > 
> > 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 <stefanb@linux.vnet.ibm.com>
> > Signed-off-by: Joel Schopp <jschopp@linux.vnet.ibm.com>
> > 
> > For minor tweeks/rebase I've done to it:
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > ---
> >  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 / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2014-08-07 10:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 17:30 [Qemu-devel] [PATCH 0/2] In memory QEMUFile Dr. David Alan Gilbert (git)
2014-08-06 17:30 ` [Qemu-devel] [PATCH 1/2] QEMUSizedBuffer based QEMUFile Dr. David Alan Gilbert (git)
2014-08-06 18:56   ` Eric Blake
2014-08-07 10:25     ` Dr. David Alan Gilbert [this message]
2014-08-06 17:30 ` [Qemu-devel] [PATCH 2/2] Tests: QEMUSizedBuffer/QEMUBuffer Dr. David Alan Gilbert (git)
2014-08-06 17:56 ` [Qemu-devel] [PATCH 0/2] In memory QEMUFile Joel Schopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140807102536.GA2339@work-vm \
    --to=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=joel.schopp@amd.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanb@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).