[libvirt] [PATCH] Fix qemuProcessReadLog with non-zero offset

Eric Blake eblake at redhat.com
Thu Aug 15 13:18:44 UTC 2013


On 08/15/2013 07:10 AM, Ján Tomko wrote:
> This restores the error message when QMP probing is not used.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=991334
> ---
>  src/qemu/qemu_process.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

ACK.

> +++ b/src/qemu/qemu_process.c
> @@ -1435,18 +1435,17 @@ qemuProcessReadLog(int fd, char *buf, int buflen, int off)
>      ssize_t bytes;
>      char *eol;
>  
> -    buf[0] = '\0';

A smaller fix might be to change this to buf[off] = '\0'; but your way
is just fine as is.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130815/049f4c37/attachment-0001.sig>


More information about the libvir-list mailing list