libxl_conf: reuse virDomainNetGetActualtype in libxlMakeNicList

Reuse existing helper function virDomainNetGetActualtype.

Signed-off-by: Chunyan Liu <cyliu@suse.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
Chunyan Liu 2016-03-10 10:50:41 +08:00 committed by Jim Fehlig
parent 2f0d57e4b0
commit f41e03c63f

View File

@ -1445,7 +1445,7 @@ libxlMakeNicList(virDomainDefPtr def, libxl_domain_config *d_config)
return -1;
for (i = 0; i < nnics; i++) {
if (l_nics[i]->type == VIR_DOMAIN_NET_TYPE_HOSTDEV)
if (virDomainNetGetActualType(l_nics[i]) == VIR_DOMAIN_NET_TYPE_HOSTDEV)
continue;
if (libxlMakeNic(def, l_nics[i], &x_nics[nvnics]))