[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] backport requests for 4.x-testing

libxl: write vifname in xenstore if set.

Simple fix to enable user to specify vif names.

xen-unstable changeset: 24459:caf9753d4cc1
Backport-requested-by: Roderick Colenbrander <thunderbird2k@xxxxxxxxx>

Signed-off-by: Giam Teck Choon <giamteckchoon@xxxxxxxxx>

 tools/libxl/libxl.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 902f282..19ef6a0 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -1229,6 +1229,12 @@ int libxl_device_nic_add(libxl_ctx *ctx,
uint32_t domid, libxl_device_nic *nic)
     flexarray_append(back, libxl__sprintf(&gc, "%d", 1));
     flexarray_append(back, "script");
     flexarray_append(back, nic->script);
+    if (nic->ifname) {
+       flexarray_append(back, "vifname");
+       flexarray_append(back, nic->ifname);
+    }
     flexarray_append(back, "mac");
     flexarray_append(back, libxl__sprintf(&gc, "%02x:%02x:%02x:%02x:%02x:%02x",
nic->mac[1], nic->mac[2],

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.