xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Ulf Kreutzberg <ulf.kreutzberg@hosteurope.de>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 1/2] xl/libxl: add netdev to vif specification
Date: Tue, 5 Feb 2013 12:39:12 +0100	[thread overview]
Message-ID: <5110EF60.8010207@citrix.com> (raw)
In-Reply-To: <1360062659.17017.43.camel@zakaz.uk.xensource.com>

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.
> 

  reply	other threads:[~2013-02-05 11:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25 15:26 [PATCH 0/2] add vif-route support to libxl/xl Roger Pau Monne
2013-01-25 15:26 ` [PATCH 1/2] xl/libxl: add netdev to vif specification Roger Pau Monne
2013-02-05 10:40   ` Ian Campbell
2013-02-05 10:56     ` Roger Pau Monné
2013-02-05 11:10       ` Ian Campbell
2013-02-05 11:39         ` Roger Pau Monné [this message]
2013-02-05 11:41           ` Ian Campbell
2013-01-25 15:26 ` [PATCH 2/2] xl: allow specifying a default netdev in xl.conf Roger Pau Monne
2013-01-28 11:00   ` George Dunlap
2013-01-28 17:11     ` George Dunlap
2013-01-29 11:01       ` Roger Pau Monné
2013-02-05 10:41     ` Ian Campbell
2013-02-05 11:00       ` Roger Pau Monné
2013-02-05 11:09         ` Ian Campbell
2013-01-25 16:16 ` [PATCH 0/2] add vif-route support to libxl/xl Roger Pau Monné
2013-02-05 11:48 ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5110EF60.8010207@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=ulf.kreutzberg@hosteurope.de \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).