From: Anthony Perard Date: Mon, 9 Aug 2010 15:46:00 +0000 (+0100) Subject: libxl, Fix name of tap device. X-Git-Tag: 4.1.0-rc1~755 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=adf97edda203ed6e48134029c0acc00164bb5934;p=xen.git libxl, Fix name of tap device. From: Anthony PERARD Currently, tap device names for a domain begin at tap42.-1, but it must be tap42.0. Signed-off-by: Anthony PERARD Signed-off-by: Stefano Stabellini --- tools/libxl/libxl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 732772c12b..97cca38a69 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1070,7 +1070,7 @@ static char ** libxl_build_device_model_args(libxl_ctx *ctx, vifs[i].mac[0], vifs[i].mac[1], vifs[i].mac[2], vifs[i].mac[3], vifs[i].mac[4], vifs[i].mac[5]); if (!vifs[i].ifname) - vifs[i].ifname = libxl_sprintf(ctx, "tap%d.%d", info->domid, vifs[i].devid - 1); + vifs[i].ifname = libxl_sprintf(ctx, "tap%d.%d", info->domid, vifs[i].devid); flexarray_set(dm_args, num++, "-net"); flexarray_set(dm_args, num++, libxl_sprintf(ctx, "nic,vlan=%d,macaddr=%s,model=%s", vifs[i].devid, smac, vifs[i].model));