xcp-1.6-updates/xen-4.1.hg

changeset 23274:98dbb195d270

libxl: write vifname in xenstore if set.

Simple fix to enable user to specify vif names.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>

xen-unstable changeset: 24459:caf9753d4cc1
Backport-requested-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Giam Teck Choon <giamteckchoon@gmail.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Giam Teck Choon <giamteckchoon@gmail.com>
date Tue Apr 03 16:03:47 2012 +0100 (2012-04-03)
parents b574b8b6bb10
children 369bf6c946b9
files tools/libxl/libxl.c
line diff
     1.1 --- a/tools/libxl/libxl.c	Fri Mar 30 17:19:18 2012 +0100
     1.2 +++ b/tools/libxl/libxl.c	Tue Apr 03 16:03:47 2012 +0100
     1.3 @@ -1229,6 +1229,12 @@ int libxl_device_nic_add(libxl_ctx *ctx,
     1.4      flexarray_append(back, libxl__sprintf(&gc, "%d", 1));
     1.5      flexarray_append(back, "script");
     1.6      flexarray_append(back, nic->script);
     1.7 +
     1.8 +    if (nic->ifname) {
     1.9 +       flexarray_append(back, "vifname");
    1.10 +       flexarray_append(back, nic->ifname);
    1.11 +    }
    1.12 +
    1.13      flexarray_append(back, "mac");
    1.14      flexarray_append(back, libxl__sprintf(&gc, "%02x:%02x:%02x:%02x:%02x:%02x",
    1.15                                                   nic->mac[0], nic->mac[1], nic->mac[2],