From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xen.org
Cc: Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v2 5/5] libxl: add "downscript=no" to Qemu call
Date: Tue, 17 Apr 2012 16:51:16 +0100 [thread overview]
Message-ID: <1334677876-17704-6-git-send-email-roger.pau@citrix.com> (raw)
In-Reply-To: <1334677876-17704-1-git-send-email-roger.pau@citrix.com>
Currently we only pass script=no to Qemu, to avoid calling any scripts when
attaching a tap interface, but we should also pass downscript=no to avoid Qemu
trying to execute a script when disconnecting the interface. This prevents the
following harmless error message:
/etc/qemu-ifdown: could not launch network script
Changes since v1:
* Indentation fixes.
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
---
tools/libxl/libxl_dm.c | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 04f76c2..d9c1786 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -216,11 +216,18 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
else
ifname = libxl__sprintf(gc, "xentap-%s", vifs[i].ifname);
flexarray_vappend(dm_args,
- "-net", libxl__sprintf(gc, "nic,vlan=%d,macaddr=%s,model=%s",
- vifs[i].devid, smac, vifs[i].model),
- "-net", libxl__sprintf(gc, "tap,vlan=%d,ifname=%s,bridge=%s,script=%s",
- vifs[i].devid, ifname, vifs[i].bridge, libxl_tapif_script(gc)),
- NULL);
+ "-net",
+ libxl__sprintf(gc,
+ "nic,vlan=%d,macaddr=%s,model=%s",
+ vifs[i].devid, smac, vifs[i].model),
+ "-net",
+ libxl__sprintf(gc,
+ "tap,vlan=%d,ifname=%s,bridge=%s,"
+ "script=%s,downscript=%s",
+ vifs[i].devid, ifname, vifs[i].bridge,
+ libxl_tapif_script(gc),
+ libxl_tapif_script(gc)),
+ NULL);
ioemu_vifs++;
}
}
@@ -461,10 +468,12 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
vifs[i].model, vifs[i].devid,
vifs[i].devid, smac));
flexarray_append(dm_args, "-netdev");
- flexarray_append(dm_args,
- libxl__sprintf(gc, "type=tap,id=net%d,ifname=%s,script=%s",
- vifs[i].devid, ifname,
- libxl_tapif_script(gc)));
+ flexarray_append(dm_args, libxl__sprintf(gc,
+ "type=tap,id=net%d,ifname=%s,"
+ "script=%s,downscript=%s",
+ vifs[i].devid, ifname,
+ libxl_tapif_script(gc),
+ libxl_tapif_script(gc)));
ioemu_vifs++;
}
}
--
1.7.7.5 (Apple Git-26)
next prev parent reply other threads:[~2012-04-17 15:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 15:51 [PATCH v2 0/5] libxl: call hotplug scripts from libxl Roger Pau Monne
2012-04-17 15:51 ` [PATCH v2 1/5] libxl: allow libxl__exec to take a parameter containing the env variables Roger Pau Monne
2012-04-17 15:51 ` [PATCH v2 2/5] libxl: add libxl__xs_path_cleanup Roger Pau Monne
2012-04-18 8:51 ` Ian Campbell
2012-04-17 15:51 ` [PATCH v2 3/5] libxl: call hotplug scripts from libxl for vbd Roger Pau Monne
2012-04-18 9:25 ` Ian Campbell
2012-04-17 15:51 ` [PATCH v2 4/5] libxl: call hotplug scripts from libxl for vif Roger Pau Monne
2012-04-18 9:54 ` Ian Campbell
2012-04-18 11:22 ` Roger Pau Monne
2012-04-18 12:31 ` Ian Campbell
2012-04-18 13:28 ` Roger Pau Monne
2012-04-18 13:31 ` Ian Campbell
2012-04-18 13:48 ` Roger Pau Monne
2012-04-18 15:30 ` Ian Campbell
2012-04-18 15:40 ` Roger Pau Monne
2012-04-20 12:47 ` Ian Campbell
2012-04-18 16:24 ` Roger Pau Monne
2012-04-18 17:22 ` Ian Campbell
2012-04-18 11:58 ` Roger Pau Monne
2012-04-18 12:34 ` Ian Campbell
2012-04-17 15:51 ` Roger Pau Monne [this message]
2012-04-18 9:56 ` [PATCH v2 5/5] libxl: add "downscript=no" to Qemu call 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=1334677876-17704-6-git-send-email-roger.pau@citrix.com \
--to=roger.pau@citrix.com \
--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).