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

[Xen-changelog] [xen-4.1-testing] libxl: write vifname in xenstore if set.



# HG changeset patch
# User Giam Teck Choon <giamteckchoon@xxxxxxxxx>
# Date 1333465427 -3600
# Node ID 98dbb195d270e0f096a9c92aa6b83bba4422073c
# Parent  b574b8b6bb108a7768825471a5f85f40c20b1cec
libxl: write vifname in xenstore if set.

Simple fix to enable user to specify vif names.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
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@xxxxxxxxx>
Signed-off-by: Giam Teck Choon <giamteckchoon@xxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r b574b8b6bb10 -r 98dbb195d270 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Fri Mar 30 17:19:18 2012 +0100
+++ b/tools/libxl/libxl.c       Tue Apr 03 16:03:47 2012 +0100
@@ -1229,6 +1229,12 @@ int libxl_device_nic_add(libxl_ctx *ctx,
     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[0], nic->mac[1], 
nic->mac[2],

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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