Re: [libvirt] [PATCH 1/2] qemu: blockPeek: Fix filling of the return buffer

2017-09-19 Thread Peter Krempa
On Mon, Sep 18, 2017 at 12:29:57 -0500, Eric Blake wrote: > On 09/18/2017 09:11 AM, Peter Krempa wrote: > > Commit 3956af495e broke the blockPeek API since virStorageFileRead > > allocates a return buffer and fills it with the data, while the API > > fills a user-provided buffer. This did not get

Re: [libvirt] [PATCH 1/2] qemu: blockPeek: Fix filling of the return buffer

2017-09-18 Thread Eric Blake
On 09/18/2017 09:11 AM, Peter Krempa wrote: > Commit 3956af495e broke the blockPeek API since virStorageFileRead > allocates a return buffer and fills it with the data, while the API > fills a user-provided buffer. This did not get caught by the compiler > since the API prototype uses a 'void *'.

[libvirt] [PATCH 1/2] qemu: blockPeek: Fix filling of the return buffer

2017-09-18 Thread Peter Krempa
Commit 3956af495e broke the blockPeek API since virStorageFileRead allocates a return buffer and fills it with the data, while the API fills a user-provided buffer. This did not get caught by the compiler since the API prototype uses a 'void *'. Fix it by transferring the data from the allocated