Essentially virNWFilterSaveDef executed in a different order the same
sequence of calls, so let's just make one point of reference.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/conf/nwfilter_conf.c | 37 -------------------------------------
src/conf/nwfilter_conf.h | 4 ----
src/libvirt_private.syms | 2 +-
src/nwfilter/nwfilter_driver.c | 2 +-
4 files changed, 2 insertions(+), 43 deletions(-)
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index 2352e60..752d4e1 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -2932,43 +2932,6 @@ virNWFilterTriggerVMFilterRebuild(void)
int
-virNWFilterSaveDef(const char *configDir,
- virNWFilterDefPtr def)
-{
- char uuidstr[VIR_UUID_STRING_BUFLEN];
- char *xml;
- int ret = -1;
- char *configFile = NULL;
-
- if (virFileMakePath(configDir) < 0) {
- virReportSystemError(errno,
- _("cannot create config directory %s"),
- configDir);
- goto error;
- }
-
- if (!(configFile = virFileBuildPath(configDir, def->name, ".xml")))
- goto error;
-
- if (!(xml = virNWFilterDefFormat(def))) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- "%s", _("failed to generate XML"));
- goto error;
- }
-
- virUUIDFormat(def->uuid, uuidstr);
- ret = virXMLSaveFile(configFile,
- virXMLPickShellSafeComment(def->name, uuidstr),
- "nwfilter-edit", xml);
- VIR_FREE(xml);
-
- error:
- VIR_FREE(configFile);
- return ret;
-}
-
-
-int
virNWFilterDeleteDef(const char *configDir,
virNWFilterDefPtr def)
{
diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h
index 5bf9c3d..5cac260 100644
--- a/src/conf/nwfilter_conf.h
+++ b/src/conf/nwfilter_conf.h
@@ -570,10 +570,6 @@ int
virNWFilterTriggerVMFilterRebuild(void);
int
-virNWFilterSaveDef(const char *configDir,
- virNWFilterDefPtr def);
-
-int
virNWFilterDeleteDef(const char *configDir,
virNWFilterDefPtr def);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 13f2ab9..170ecce 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -740,7 +740,7 @@ virNWFilterRuleIsProtocolEthernet;
virNWFilterRuleIsProtocolIPv4;
virNWFilterRuleIsProtocolIPv6;
virNWFilterRuleProtocolTypeToString;
-virNWFilterSaveDef;
+virNWFilterSaveConfig;
virNWFilterTriggerVMFilterRebuild;
virNWFilterUnlockFilterUpdates;
virNWFilterUnRegisterCallbackDriver;
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index 781a7a0..faa4fe8 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -510,7 +510,7 @@ nwfilterDefineXML(virConnectPtr conn,
def = NULL;
objdef = virNWFilterObjGetDef(obj);
- if (virNWFilterSaveDef(driver->configDir, objdef) < 0) {
+ if (virNWFilterSaveConfig(driver->configDir, objdef) < 0) {
virNWFilterObjListRemove(driver->nwfilters, obj);
goto cleanup;
}
--
2.9.3