[libvirt] [PATCH 4/4] DEBUG: print out netlink message.

Tang Chen tangchen at cn.fujitsu.com
Wed Aug 22 01:20:38 UTC 2012


On 08/21/2012 11:11 PM, Doug Goldstein wrote:
> On Tue, Aug 21, 2012 at 5:12 AM, Tang Chen<tangchen at cn.fujitsu.com>  wrote:
>> Signed-off-by: Tang Chen<tangchen at cn.fujitsu.com>
>> ---
>>   src/util/virnetlink.c |    2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
>> index fff98f1..3e6f26a 100644
>> --- a/src/util/virnetlink.c
>> +++ b/src/util/virnetlink.c
>> @@ -342,6 +342,8 @@ virNetlinkEventCallback(int watch,
>>           return;
>>       }
>>
>> +    VIR_DEBUG("Netlink msg: %s", msg);
> Netlink messages aren't guaranteed to be printable characters or NULL
> terminated strings. A lot of times they are binary structures tossed
> from the kernel to user space and printing them like this could lead
> to bad things.
OK, I see. I will remove this and try to find out a better idea.
Thanks. :)

>
>> +
>>       virNetlinkEventServerLock(srv);
>>
>>       VIR_DEBUG("dispatching to max %d clients, called from event watch %d",
>> --
>> 1.7.10.1
>>




More information about the libvir-list mailing list