aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_create.c
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@citrix.com>2012-07-26 16:47:33 +0100
committerRoger Pau Monne <roger.pau@citrix.com>2012-07-26 16:47:33 +0100
commit24bc7a06aea0dd3cb3c9e0ba6c0367d54fdd503e (patch)
treef4067a4c79079169d2d8fb5b6d82c32e8ce88e7d /tools/libxl/libxl_create.c
parent314e64084d310263417f5caf0668cca3d160ba1c (diff)
downloadxen-24bc7a06aea0dd3cb3c9e0ba6c0367d54fdd503e.tar.gz
xen-24bc7a06aea0dd3cb3c9e0ba6c0367d54fdd503e.tar.bz2
xen-24bc7a06aea0dd3cb3c9e0ba6c0367d54fdd503e.zip
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 <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_create.c')
-rw-r--r--tools/libxl/libxl_create.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index b9dd547c6a..3fd33e7065 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -943,7 +943,9 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__ao_devices *aodevs,
* called libxl_device_nic_add at this point, but qemu needs
* the nic information to be complete.
*/
- libxl__device_nic_setdefault(gc, &d_config->nics[i]);
+ ret = libxl__device_nic_setdefault(gc, &d_config->nics[i], domid);
+ if (ret)
+ goto error_out;
}
switch (d_config->c_info.type) {
case LIBXL_DOMAIN_TYPE_HVM: