libxl: small fix in parsing network

Signed-off-by: Chunyan Liu <cyliu@suse.com>
This commit is contained in:
Chunyan Liu 2016-02-23 16:07:58 +08:00 committed by Jim Fehlig
parent 5a5c2837c8
commit 5c79c445c2
2 changed files with 2 additions and 2 deletions

View File

@ -1471,7 +1471,7 @@ libxlMakeNicList(virDomainDefPtr def, libxl_domain_config *d_config)
VIR_SHRINK_N(x_nics, nnics, nnics - nvnics);
d_config->nics = x_nics;
d_config->num_nics = nnics;
d_config->num_nics = nvnics;
return 0;

View File

@ -315,7 +315,7 @@ libxlDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
virDomainHostdevSubsysPCIPtr pcisrc;
if (dev->type == VIR_DOMAIN_DEVICE_NET)
hostdev = &(dev->data.net)->data.hostdev.def;
hostdev = &dev->data.net->data.hostdev.def;
else
hostdev = dev->data.hostdev;
pcisrc = &hostdev->source.subsys.u.pci;