aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_dm.c
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@citrix.com>2012-05-10 17:33:58 +0100
committerRoger Pau Monne <roger.pau@citrix.com>2012-05-10 17:33:58 +0100
commiteeb84c462b7bf6e2d893077eb4dd8c42878ebdc7 (patch)
tree6292e3258c03932345c57a245e85a9854b906f28 /tools/libxl/libxl_dm.c
parent10626831dc0e16c6b981e6c331abe0b1b96d38a6 (diff)
downloadxen-eeb84c462b7bf6e2d893077eb4dd8c42878ebdc7.tar.gz
xen-eeb84c462b7bf6e2d893077eb4dd8c42878ebdc7.tar.bz2
xen-eeb84c462b7bf6e2d893077eb4dd8c42878ebdc7.zip
libxl: add "downscript=no" to Qemu call
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 Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_dm.c')
-rw-r--r--tools/libxl/libxl_dm.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index d84dcd665a..40ab458eac 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -218,9 +218,14 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
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",
+ GCSPRINTF(
+ "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++;
}
}
@@ -462,10 +467,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, GCSPRINTF(
+ "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++;
}
}