From: Ian Campbell Subject: Re: [PATCH 1/2] xl/libxl: add netdev to vif specification Date: Tue, 5 Feb 2013 11:10:59 +0000 Message-ID: <1360062659.17017.43.camel@zakaz.uk.xensource.com> References: <1359127583-32490-1-git-send-email-roger.pau@citrix.com> <1359127583-32490-2-git-send-email-roger.pau@citrix.com> <1360060806.17017.25.camel@zakaz.uk.xensource.com> <5110E563.8030604@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5110E563.8030604@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: Ulf Kreutzberg , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org 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... env[nr++] = netdev ? : "" might suffice? Ian.