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

2014-10-08 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: On 2014/9/29 17:41, Dr. David Alan Gilbert (git) wrote: +static ssize_t qsb_grow(QEMUSizedBuffer *qsb, size_t new_size) +{ +size_t needed_chunks, i; + +if (qsb-size new_size) { +struct iovec *new_iov; +size_t

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

2014-10-08 Thread Markus Armbruster
Dr. David Alan Gilbert dgilb...@redhat.com writes: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: On 2014/9/29 17:41, Dr. David Alan Gilbert (git) wrote: +static ssize_t qsb_grow(QEMUSizedBuffer *qsb, size_t new_size) +{ +size_t needed_chunks, i; + +if (qsb-size

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

2014-10-08 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: +static ssize_t qsb_grow(QEMUSizedBuffer *qsb, size_t new_size) +{ +size_t needed_chunks, i; + +if (qsb-size new_size) { +struct iovec *new_iov; +size_t size_diff = new_size - qsb-size; +size_t

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

2014-10-08 Thread zhanghailiang
On 2014/10/8 17:08, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: +static ssize_t qsb_grow(QEMUSizedBuffer *qsb, size_t new_size) +{ +size_t needed_chunks, i; + +if (qsb-size new_size) { +struct iovec *new_iov; +size_t size_diff

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

2014-10-07 Thread zhanghailiang
On 2014/9/29 17:41, Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@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

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

2014-09-29 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@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