 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] xl/libxl: add netdev to vif specification
 On 05/02/13 12:10, Ian Campbell wrote:
> On Tue, 2013-02-05 at 10:56 +0000, Roger Pau Monne wrote:
>>>> @@ -98,6 +103,8 @@ static char **get_hotplug_env(libxl__gc *gc,
>>>>      env[nr++] = GCSPRINTF("backend/%s/%u/%d", type, dev->domid, 
>>>> dev->devid);
>>>>      env[nr++] = "XENBUS_BASE_PATH";
>>>>      env[nr++] = "backend";
>>>> +    env[nr++] = "netdev";
>>>> +    env[nr++] = netdev;
>>>
>>> Mightn't this be NULL?
>>
>> Yes, if we are using the vif-bridge script this will be NULL, but I
>> prefer adding this NULL here rather than having a conditional and a
>> variable array size (because we also have an assert(nr == arraysize) at
>> the end of the code block).
> 
> Doesn't NULL terminate the env list? That might work right now while
> this option is last but it will confuse the hell out of whoever adds the
> next variable...
Indeed, good catch. Also we are enforcing this (not passing NULL values
in env variables) in libxl__exec.
> env[nr++] = netdev ? : "" might suffice?
Yes.
> Ian.
> 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |