[libvirt] [PATCH 1/4] Improve netlink to support all protocol.

Tang Chen tangchen at cn.fujitsu.com
Wed Aug 22 02:40:22 UTC 2012


Hi ~

On 08/21/2012 11:04 PM, Doug Goldstein wrote:
>> +    virNetlinkHandle *nlhandle = NULL;
>> +
>> +    if (protocol>= MAX_LINKS) {
>> +        virReportSystemError(EINVAL,
>> +                             _("invalid protocol argument: %d"), protocol);
>> +        return -EINVAL;
>> +    }
>> +
>> +    if (groups>= 32) {
> I believe there is a define for this in the headers so it would be
> better to use that then hardcoding a number without any code comments
> to what it means. If there's not a define, I would at least document
> what the 32 is and where it derives from the kernel code so that if
> things change in the future it will be easier to fix.
And also, it was my mistake to have a little misunderstanding about this 
argument.
"groups" should be a mask representing the groups to join in. So this 
check is obviously wrong.

Thanks for the comments. :)







More information about the libvir-list mailing list