char *filename;
const char *oldfilename;
virDomainDefPtr def = NULL;
+ virConfPtr conf = NULL;
xenXMConfCachePtr entry = NULL;
xenUnifiedPrivatePtr priv = (xenUnifiedPrivatePtr) conn->privateData;
return (NULL);
}
+ if (!(conf = xenFormatXM(conn, def, priv->xendConfigVersion)))
+ goto error;
+
/*
* check that if there is another domain defined with the same uuid
* it has the same name
if (!(filename = virFileBuildPath(priv->configDir, def->name, NULL)))
goto error;
- if (xenXMConfigSaveFile(conn, filename, def) < 0)
+ if (virConfWriteFile(filename, conf) < 0)
goto error;
if (VIR_ALLOC(entry) < 0) {
if (entry)
VIR_FREE(entry->filename);
VIR_FREE(entry);
+ virConfFree(conf);
virDomainDefFree(def);
xenUnifiedUnlock(priv);
return (NULL);