[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools: libxl: read nictype from xenstore
commit 498da5bf3d41e1155c98e9cff3090b114d837fc9 Author: Wen Congyang <wency@xxxxxxxxxxxxxx> AuthorDate: Mon Sep 22 13:59:16 2014 +0800 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Mon Sep 22 15:19:54 2014 +0100 tools: libxl: read nictype from xenstore We need to use nictype to get default vifname. Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/libxl.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index f796da8..77672d0 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -3348,7 +3348,13 @@ static int libxl__device_nic_from_xs_be(libxl__gc *gc, nic->script = READ_BACKEND(NOGC, "script"); /* vif_ioemu nics use the same xenstore entries as vif interfaces */ - nic->nictype = LIBXL_NIC_TYPE_VIF; + tmp = READ_BACKEND(gc, "type"); + if (tmp) { + rc = libxl_nic_type_from_string(tmp, &nic->nictype); + if (rc) goto out; + } else { + nic->nictype = LIBXL_NIC_TYPE_VIF; + } nic->model = NULL; /* XXX Only for TYPE_IOEMU */ nic->ifname = NULL; /* XXX Only for TYPE_IOEMU */ -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |