[PATCH V3 1/2] libxl_conf: reuse virDomainNetGetActualtype in libxlMakeNicList

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reuse existing helper function virDomainNetGetActualtype.

Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx>
---
 src/libxl/libxl_conf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 93c943b..2b77c59 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1445,7 +1445,8 @@ 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]))
-- 
2.1.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]