# HG changeset patch # User Wei Liu # Date 1325783613 0 # Node ID caf9753d4cc100183eeda26d00c8c38f14215651 # Parent 19ac027a3c311159dc0f3696d6e571314f0bf0c3 libxl: write vifname in xenstore if set. Simple fix to enable user to specify vif names. Signed-off-by: Wei Liu Acked-by: Ian Campbell Committed-by: Ian Jackson Index: xen-4.1.2-testing/tools/libxl/libxl.c =================================================================== --- xen-4.1.2-testing.orig/tools/libxl/libxl.c +++ xen-4.1.2-testing/tools/libxl/libxl.c @@ -1233,6 +1233,12 @@ int libxl_device_nic_add(libxl_ctx *ctx, flexarray_append(back, libxl__sprintf(&gc, "%02x:%02x:%02x:%02x:%02x:%02x", nic->mac[0], nic->mac[1], nic->mac[2], nic->mac[3], nic->mac[4], nic->mac[5])); + + if (nic->ifname) { + flexarray_append(back, "vifname"); + flexarray_append(back, nic->ifname); + } + if (nic->ip) { flexarray_append(back, "ip"); flexarray_append(back, libxl__strdup(&gc, nic->ip));