From 24bc7a06aea0dd3cb3c9e0ba6c0367d54fdd503e Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Thu, 26 Jul 2012 16:47:33 +0100 Subject: libxl: set correct nic type depending on the guest Fix the use of nic type, which results in the following for each type of domain: * HVM: let the user choose, if none specified use VIF_IOEMU. * PV: use VIF is none provided, return error if VIF_IOEMU requested. Signed-off-by: Roger Pau Monne Acked-by: Ian Jackson Committed-by: Ian Campbell --- tools/libxl/libxl_dm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/libxl/libxl_dm.c') diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index dec7c19661..606cc29cdd 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -898,7 +898,9 @@ static void spawn_stub_launch_dm(libxl__egc *egc, * called libxl_device_nic_add at this point, but qemu needs * the nic information to be complete. */ - libxl__device_nic_setdefault(gc, &dm_config->nics[i]); + ret = libxl__device_nic_setdefault(gc, &dm_config->nics[i], dm_domid); + if (ret) + goto out; } ret = libxl_device_vfb_add(ctx, dm_domid, &dm_config->vfbs[0]); if (ret) -- cgit v1.2.3