[PATCH v3 01/20] conf: change virNWFilterBindingPtr to virNWFilterBindingDefPtr

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

 



We are going to want to expose the NWFilter binding concept in the
public API, so the virNWFilterBindingPtr type needs to be used there.
Our internal type will shortly gain an XML representation, so rename
it to virNWFilterBindingDefPtr which follows our normal conventions.

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>
Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/conf/nwfilter_conf.c | 24 ++++++++++++------------
 src/conf/nwfilter_conf.h | 12 ++++++------
 src/libvirt_private.syms |  4 ++--
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index 452daa214a..6422f6b8ea 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -3268,25 +3268,25 @@ virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefPtr rule)
 
 
 void
-virNWFilterBindingFree(virNWFilterBindingPtr binding)
+virNWFilterBindingDefFree(virNWFilterBindingDefPtr def)
 {
-    if (!binding)
+    if (!def)
         return;
 
-    VIR_FREE(binding->ownername);
-    VIR_FREE(binding->portdevname);
-    VIR_FREE(binding->linkdevname);
-    VIR_FREE(binding->filter);
-    virHashFree(binding->filterparams);
+    VIR_FREE(def->ownername);
+    VIR_FREE(def->portdevname);
+    VIR_FREE(def->linkdevname);
+    VIR_FREE(def->filter);
+    virHashFree(def->filterparams);
 
-    VIR_FREE(binding);
+    VIR_FREE(def);
 }
 
 
-virNWFilterBindingPtr
-virNWFilterBindingCopy(virNWFilterBindingPtr src)
+virNWFilterBindingDefPtr
+virNWFilterBindingDefCopy(virNWFilterBindingDefPtr src)
 {
-    virNWFilterBindingPtr ret;
+    virNWFilterBindingDefPtr ret;
 
     if (VIR_ALLOC(ret) < 0)
         return NULL;
@@ -3316,6 +3316,6 @@ virNWFilterBindingCopy(virNWFilterBindingPtr src)
     return ret;
 
  error:
-    virNWFilterBindingFree(ret);
+    virNWFilterBindingDefFree(ret);
     return NULL;
 }
diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h
index 6fcbba4bd5..c72171f2f2 100644
--- a/src/conf/nwfilter_conf.h
+++ b/src/conf/nwfilter_conf.h
@@ -545,10 +545,10 @@ struct _virNWFilterDef {
     virNWFilterEntryPtr *filterEntries;
 };
 
-typedef struct virNWFilterBinding virNWFilterBinding;
-typedef virNWFilterBinding *virNWFilterBindingPtr;
+typedef struct _virNWFilterBindingDef virNWFilterBindingDef;
+typedef virNWFilterBindingDef *virNWFilterBindingDefPtr;
 
-struct virNWFilterBinding {
+struct _virNWFilterBindingDef {
     char *ownername;
     unsigned char owneruuid[VIR_UUID_BUFLEN];
     char *portdevname;
@@ -664,9 +664,9 @@ bool
 virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefPtr rule);
 
 void
-virNWFilterBindingFree(virNWFilterBindingPtr binding);
-virNWFilterBindingPtr
-virNWFilterBindingCopy(virNWFilterBindingPtr src);
+virNWFilterBindingDefFree(virNWFilterBindingDefPtr binding);
+virNWFilterBindingDefPtr
+virNWFilterBindingDefCopy(virNWFilterBindingDefPtr src);
 
 VIR_ENUM_DECL(virNWFilterRuleAction);
 VIR_ENUM_DECL(virNWFilterRuleDirection);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index ea24f2847c..a8e9469286 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -788,8 +788,8 @@ virDomainNumatuneSpecifiedMaxNode;
 
 
 # conf/nwfilter_conf.h
-virNWFilterBindingCopy;
-virNWFilterBindingFree;
+virNWFilterBindingDefCopy;
+virNWFilterBindingDefFree;
 virNWFilterCallbackDriversLock;
 virNWFilterCallbackDriversUnlock;
 virNWFilterChainSuffixTypeToString;
-- 
2.17.0

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

  Powered by Linux