[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v2 01/12] QEMUSizedBuffer/QEMUFile
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH RFC v2 01/12] QEMUSizedBuffer/QEMUFile |
Date: |
Mon, 28 Jul 2014 15:32:57 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 07/25/2014 09:39 AM, Sanidhya Kashyap wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> Stefan Berger's to create a QEMUFile that goes to a memory buffer;
Missing something. Maybe you meant:
This is based on Stefan Berger's patch to create ...
> 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.
Odd line breaking.
>
> Signed-off-by: Stefan Berger <address@hidden>
> Signed-off-by: Joel Schopp <address@hidden>
Still looks weird to have David as author but not listed in S-o-B.
> ---
> include/migration/qemu-file.h | 27 +++
> qemu-file.c | 411
> ++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 438 insertions(+)
>
> +/**
> + * Set the length of the buffer; The primary usage of this
s/The/the/
> + * function is to truncate the number of used bytes in the buffer.
> + * The size will not be extended beyond the current number of
no need for double space
> + * allocated bytes in the QEMUSizedBuffer.
> + *
> + * @qsb: A QEMUSizedBuffer
> + * @new_len : The new length of bytes in the buffer
> + *
> + * Returns the number of bytes the buffer was trucated or extended
s/trucated/truncated/
> +
> +QEMUFile *qemu_bufopen(const char *mode, QEMUSizedBuffer *input)
> +{
> + QEMUBuffer *s;
> +
> + if (mode == NULL || (mode[0] != 'r' && mode[0] != 'w') || mode[1] != 0) {
> + fprintf(stderr, "qemu_bufopen: Argument validity check failed\n");
Should this function be directly printing to stderr, or should it be
converted to use Error **errp semantics?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH RFC v2 00/12] VMState testing, Sanidhya Kashyap, 2014/07/25
- [Qemu-devel] [PATCH RFC v2 01/12] QEMUSizedBuffer/QEMUFile, Sanidhya Kashyap, 2014/07/25
- Re: [Qemu-devel] [PATCH RFC v2 01/12] QEMUSizedBuffer/QEMUFile,
Eric Blake <=
- [Qemu-devel] [PATCH RFC v2 02/12] reset handler for qdevified devices, Sanidhya Kashyap, 2014/07/25
- [Qemu-devel] [PATCH RFC v2 03/12] VMState test: query command to extract the qdevified device names, Sanidhya Kashyap, 2014/07/25
- [Qemu-devel] [PATCH RFC v2 04/12] VMState test: hmp interface for showing qdevified devices, Sanidhya Kashyap, 2014/07/25
- [Qemu-devel] [PATCH RFC v2 05/12] VMstate test: basic VMState testing mechanism, Sanidhya Kashyap, 2014/07/25