[libvirt] [PATCH] Rename remaining occurrences of 'interface' to avoid MINGW32 build problem

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

 



---
 qemud/remote.c       |    2 +-
 src/interface_conf.c |   34 +++++++++++++++++-----------------
 src/interface_conf.h |    4 ++--
 src/veth.c           |    6 +++---
 src/veth.h           |    2 +-
 5 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/qemud/remote.c b/qemud/remote.c
index 651e9fb..d32d513 100644
--- a/qemud/remote.c
+++ b/qemud/remote.c
@@ -61,7 +61,7 @@
 
 static virDomainPtr get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain domain);
 static virNetworkPtr get_nonnull_network (virConnectPtr conn, remote_nonnull_network network);
-static virInterfacePtr get_nonnull_interface (virConnectPtr conn, remote_nonnull_interface interface);
+static virInterfacePtr get_nonnull_interface (virConnectPtr conn, remote_nonnull_interface iface);
 static virStoragePoolPtr get_nonnull_storage_pool (virConnectPtr conn, remote_nonnull_storage_pool pool);
 static virStorageVolPtr get_nonnull_storage_vol (virConnectPtr conn, remote_nonnull_storage_vol vol);
 static void make_nonnull_domain (remote_nonnull_domain *dom_dst, virDomainPtr dom_src);
diff --git a/src/interface_conf.c b/src/interface_conf.c
index 1cc9f36..c2e8d07 100644
--- a/src/interface_conf.c
+++ b/src/interface_conf.c
@@ -1207,51 +1207,51 @@ virInterfaceObjPtr virInterfaceAssignDef(virConnectPtr conn,
                                          virInterfaceObjListPtr interfaces,
                                          const virInterfaceDefPtr def)
 {
-    virInterfaceObjPtr interface;
+    virInterfaceObjPtr iface;
 
-    if ((interface = virInterfaceFindByName(interfaces, def->name))) {
-        if (interface->def)
-            virInterfaceDefFree(interface->def);
-        interface->def = def;
+    if ((iface = virInterfaceFindByName(interfaces, def->name))) {
+        if (iface->def)
+            virInterfaceDefFree(iface->def);
+        iface->def = def;
 
-        return interface;
+        return iface;
     }
 
-    if (VIR_ALLOC(interface) < 0) {
+    if (VIR_ALLOC(iface) < 0) {
         virReportOOMError(conn);
         return NULL;
     }
-    if (virMutexInit(&interface->lock) < 0) {
+    if (virMutexInit(&iface->lock) < 0) {
         virInterfaceReportError(conn, VIR_ERR_INTERNAL_ERROR,
                                 "%s", _("cannot initialize mutex"));
-        VIR_FREE(interface);
+        VIR_FREE(iface);
         return NULL;
     }
-    virInterfaceObjLock(interface);
-    interface->def = def;
+    virInterfaceObjLock(iface);
+    iface->def = def;
 
     if (VIR_REALLOC_N(interfaces->objs, interfaces->count + 1) < 0) {
         virReportOOMError(conn);
-        VIR_FREE(interface);
+        VIR_FREE(iface);
         return NULL;
     }
 
-    interfaces->objs[interfaces->count] = interface;
+    interfaces->objs[interfaces->count] = iface;
     interfaces->count++;
 
-    return interface;
+    return iface;
 
 }
 
 void virInterfaceRemove(virInterfaceObjListPtr interfaces,
-                        const virInterfaceObjPtr interface)
+                        const virInterfaceObjPtr iface)
 {
     unsigned int i;
 
-    virInterfaceObjUnlock(interface);
+    virInterfaceObjUnlock(iface);
     for (i = 0 ; i < interfaces->count ; i++) {
         virInterfaceObjLock(interfaces->objs[i]);
-        if (interfaces->objs[i] == interface) {
+        if (interfaces->objs[i] == iface) {
             virInterfaceObjUnlock(interfaces->objs[i]);
             virInterfaceObjFree(interfaces->objs[i]);
 
diff --git a/src/interface_conf.h b/src/interface_conf.h
index aea1208..bb9dce4 100644
--- a/src/interface_conf.h
+++ b/src/interface_conf.h
@@ -186,14 +186,14 @@ virInterfaceObjPtr virInterfaceFindByName(const virInterfaceObjListPtr
 
 
 void virInterfaceDefFree(virInterfaceDefPtr def);
-void virInterfaceObjFree(virInterfaceObjPtr interface);
+void virInterfaceObjFree(virInterfaceObjPtr iface);
 void virInterfaceObjListFree(virInterfaceObjListPtr vms);
 
 virInterfaceObjPtr virInterfaceAssignDef(virConnectPtr conn,
                                          virInterfaceObjListPtr interfaces,
                                          const virInterfaceDefPtr def);
 void virInterfaceRemove(virInterfaceObjListPtr interfaces,
-                        const virInterfaceObjPtr interface);
+                        const virInterfaceObjPtr iface);
 
 virInterfaceDefPtr virInterfaceDefParseString(virConnectPtr conn,
                                               const char *xmlStr);
diff --git a/src/veth.c b/src/veth.c
index 04e68b2..71d7de6 100644
--- a/src/veth.c
+++ b/src/veth.c
@@ -191,16 +191,16 @@ error_out:
  *
  * Returns 0 on success or -1 in case of error
  */
-int moveInterfaceToNetNs(const char* interface, int pidInNs)
+int moveInterfaceToNetNs(const char* iface, int pidInNs)
 {
     int rc = -1;
     char *pid = NULL;
     const char *argv[] = {
-        "ip", "link", "set", interface, "netns", NULL, NULL
+        "ip", "link", "set", iface, "netns", NULL, NULL
     };
     int cmdResult;
 
-    if (NULL == interface) {
+    if (NULL == iface) {
         goto error_out;
     }
 
diff --git a/src/veth.h b/src/veth.h
index 43181cd..429eb3d 100644
--- a/src/veth.h
+++ b/src/veth.h
@@ -19,6 +19,6 @@ int vethCreate(char* veth1, int veth1MaxLen, char* veth2,
                int veth2MaxLen);
 int vethDelete(const char* veth);
 int vethInterfaceUpOrDown(const char* veth, int upOrDown);
-int moveInterfaceToNetNs(const char *interface, int pidInNs);
+int moveInterfaceToNetNs(const char *iface, int pidInNs);
 
 #endif /* VETH_H */
-- 
1.6.0.6

--
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]