Re: [PATCH] virsh: fix regression in log to file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/30/2011 07:44 AM, Eric Blake wrote:
> On 04/30/2011 04:56 AM, Supriya Kannery wrote:
>> Commit 36deff04 introduced a regression due to which virsh is not able
>> to log to a file - msg_buf was changed from an array to a pointer
>> without corresponding change to usage of "sizeof()".
>>
>> Fix regression in virsh logging
> 
> Good catch.  However, I'd prefer if we instead rewrote this function to
> use virBuffer instead of snprintf.  Much less error-prone to maintain.

On second thought, after some IRC discussions with others, I'm planning on:

1. push your patch as-is for 0.9.1 (it's minimal, which is good since
we're post-freeze)
2. after 0.9.1, revert your patch, and replace it with:
3. global rename of virBufferVSprintf -> virBufferAsprintf (to match the
existing virAsprintf name)
4. add virBufferVasprintf (to match the existing virVasprintf name)
5. fix virsh to use virBuffer, including the new virBufferVasprintf

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]