提交 cab7b8c2 编写于 作者: J John Ferlan

conf: Change virNWFilterObjDeleteDef to virNWFilterDeleteDef

Rather than pass the nwfilter object, just pass the def to the function
上级 22426736
......@@ -3263,21 +3263,19 @@ virNWFilterSaveDef(const char *configDir,
int
virNWFilterObjDeleteDef(const char *configDir,
virNWFilterObjPtr nwfilter)
virNWFilterDeleteDef(const char *configDir,
virNWFilterDefPtr def)
{
int ret = -1;
char *configFile = NULL;
if (!(configFile = virFileBuildPath(configDir,
nwfilter->def->name, ".xml"))) {
if (!(configFile = virFileBuildPath(configDir, def->name, ".xml")))
goto error;
}
if (unlink(configFile) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("cannot remove config for %s"),
nwfilter->def->name);
def->name);
goto error;
}
......
......@@ -614,8 +614,8 @@ virNWFilterObjPtr virNWFilterObjFindByName(virNWFilterObjListPtr nwfilters,
int virNWFilterSaveDef(const char *configDir,
virNWFilterDefPtr def);
int virNWFilterObjDeleteDef(const char *configDir,
virNWFilterObjPtr nwfilter);
int virNWFilterDeleteDef(const char *configDir,
virNWFilterDefPtr def);
virNWFilterObjPtr virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
virNWFilterDefPtr def);
......
......@@ -743,11 +743,11 @@ virNWFilterDefFormat;
virNWFilterDefFree;
virNWFilterDefParseFile;
virNWFilterDefParseString;
virNWFilterDeleteDef;
virNWFilterInstFiltersOnAllVMs;
virNWFilterJumpTargetTypeToString;
virNWFilterLoadAllConfigs;
virNWFilterObjAssignDef;
virNWFilterObjDeleteDef;
virNWFilterObjFindByName;
virNWFilterObjFindByUUID;
virNWFilterObjListFree;
......
......@@ -603,7 +603,7 @@ nwfilterUndefine(virNWFilterPtr obj)
goto cleanup;
}
if (virNWFilterObjDeleteDef(driver->configDir, nwfilter) < 0)
if (virNWFilterDeleteDef(driver->configDir, nwfilter->def) < 0)
goto cleanup;
virNWFilterObjRemove(&driver->nwfilters, nwfilter);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册