goto cleanup;
if (!(def = xenParseXL(conf,
cfg->caps,
- driver->xmlopt,
- cfg->verInfo->xen_version_major)))
+ driver->xmlopt)))
goto cleanup;
} else if (STREQ(nativeFormat, LIBXL_CONFIG_FORMAT_XM)) {
if (!(conf = virConfReadMem(nativeConfig, strlen(nativeConfig), 0)))
goto cleanup;
if (!(def = xenParseXM(conf,
- cfg->verInfo->xen_version_major,
cfg->caps,
driver->xmlopt)))
goto cleanup;
goto cleanup;
if (STREQ(nativeFormat, LIBXL_CONFIG_FORMAT_XL)) {
- if (!(conf = xenFormatXL(def, conn, cfg->verInfo->xen_version_major)))
+ if (!(conf = xenFormatXL(def, conn)))
goto cleanup;
} else if (STREQ(nativeFormat, LIBXL_CONFIG_FORMAT_XM)) {
- if (!(conf = xenFormatXM(conn, def, cfg->verInfo->xen_version_major)))
+ if (!(conf = xenFormatXM(conn, def)))
goto cleanup;
} else {
if (!conf)
goto cleanup;
- def = xenParseXM(conf, priv->xendConfigVersion,
- priv->caps, priv->xmlopt);
+ def = xenParseXM(conf, priv->caps, priv->xmlopt);
} else if (STREQ(format, XEN_CONFIG_FORMAT_SEXPR)) {
if (xenGetDomIdFromSxprString(config, priv->xendConfigVersion, &id) < 0)
goto cleanup;
if (STREQ(format, XEN_CONFIG_FORMAT_XM)) {
int len = MAX_CONFIG_SIZE;
- conf = xenFormatXM(conn, def, priv->xendConfigVersion);
+ conf = xenFormatXM(conn, def);
if (!conf)
goto cleanup;
if (!(conf = virConfReadFile(filename, 0)))
return NULL;
- def = xenParseXM(conf, priv->xendConfigVersion, priv->caps, priv->xmlopt);
+ def = xenParseXM(conf, priv->caps, priv->xmlopt);
virConfFree(conf);
return def;
virDomainDefPtr def)
{
virConfPtr conf;
- xenUnifiedPrivatePtr priv = conn->privateData;
int ret;
- if (!(conf = xenFormatXM(conn, def, priv->xendConfigVersion)))
+ if (!(conf = xenFormatXM(conn, def)))
return -1;
ret = virConfWriteFile(filename, conf);
return -1;
}
- if (!(conf = xenFormatXM(conn, def, priv->xendConfigVersion)))
+ if (!(conf = xenFormatXM(conn, def)))
goto error;
/*
int
xenParseConfigCommon(virConfPtr conf,
virDomainDefPtr def,
- virCapsPtr caps,
- int xendConfigVersion ATTRIBUTE_UNUSED)
+ virCapsPtr caps)
{
if (xenParseGeneralMeta(conf, def, caps) < 0)
return -1;
int
xenFormatConfigCommon(virConfPtr conf,
virDomainDefPtr def,
- virConnectPtr conn,
- int xendConfigVersion ATTRIBUTE_UNUSED)
+ virConnectPtr conn)
{
if (xenFormatGeneralMeta(conf, def) < 0)
return -1;
int xenParseConfigCommon(virConfPtr conf,
virDomainDefPtr def,
- virCapsPtr caps,
- int xendConfigVersion);
+ virCapsPtr caps);
int xenFormatConfigCommon(virConfPtr conf,
virDomainDefPtr def,
- virConnectPtr conn,
- int xendConfigVersion);
+ virConnectPtr conn);
+
#endif /* __VIR_XEN_COMMON_H__ */
virDomainDefPtr
xenParseXL(virConfPtr conf,
virCapsPtr caps,
- virDomainXMLOptionPtr xmlopt,
- int xendConfigVersion)
+ virDomainXMLOptionPtr xmlopt)
{
virDomainDefPtr def = NULL;
def->virtType = VIR_DOMAIN_VIRT_XEN;
def->id = -1;
- if (xenParseConfigCommon(conf, def, caps, xendConfigVersion) < 0)
+ if (xenParseConfigCommon(conf, def, caps) < 0)
goto cleanup;
if (xenParseXLOS(conf, def, caps) < 0)
virConfPtr
-xenFormatXL(virDomainDefPtr def, virConnectPtr conn, int xendConfigVersion)
+xenFormatXL(virDomainDefPtr def, virConnectPtr conn)
{
virConfPtr conf = NULL;
if (!(conf = virConfNew()))
goto cleanup;
- if (xenFormatConfigCommon(conf, def, conn, xendConfigVersion) < 0)
+ if (xenFormatConfigCommon(conf, def, conn) < 0)
goto cleanup;
if (xenFormatXLOS(conf, def) < 0)
virDomainDefPtr xenParseXL(virConfPtr conn,
virCapsPtr caps,
- virDomainXMLOptionPtr xmlopt,
- int xendConfigVersion);
-virConfPtr xenFormatXL(virDomainDefPtr def,
- virConnectPtr, int xendConfigVersion);
+ virDomainXMLOptionPtr xmlopt);
+
+virConfPtr xenFormatXL(virDomainDefPtr def, virConnectPtr);
#endif /* __VIR_XEN_XL_H__ */
static int
-xenParseXMDisk(virConfPtr conf, virDomainDefPtr def,
- int xendConfigVersion ATTRIBUTE_UNUSED)
+xenParseXMDisk(virConfPtr conf, virDomainDefPtr def)
{
virDomainDiskDefPtr disk = NULL;
int hvm = def->os.type == VIR_DOMAIN_OSTYPE_HVM;
static int
xenFormatXMDisk(virConfValuePtr list,
- virDomainDiskDefPtr disk,
- int hvm ATTRIBUTE_UNUSED,
- int xendConfigVersion ATTRIBUTE_UNUSED)
+ virDomainDiskDefPtr disk)
{
virBuffer buf = VIR_BUFFER_INITIALIZER;
virConfValuePtr val, tmp;
static int
-xenFormatXMDisks(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion)
+xenFormatXMDisks(virConfPtr conf, virDomainDefPtr def)
{
virConfValuePtr diskVal = NULL;
size_t i = 0;
- int hvm = def->os.type == VIR_DOMAIN_OSTYPE_HVM;
if (VIR_ALLOC(diskVal) < 0)
goto cleanup;
if (def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY)
continue;
- if (xenFormatXMDisk(diskVal, def->disks[i],
- hvm, xendConfigVersion) < 0)
+ if (xenFormatXMDisk(diskVal, def->disks[i]) < 0)
goto cleanup;
}
*/
virDomainDefPtr
xenParseXM(virConfPtr conf,
- int xendConfigVersion,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt)
{
def->virtType = VIR_DOMAIN_VIRT_XEN;
def->id = -1;
- if (xenParseConfigCommon(conf, def, caps, xendConfigVersion) < 0)
+ if (xenParseConfigCommon(conf, def, caps) < 0)
goto cleanup;
if (xenParseXMOS(conf, def) < 0)
goto cleanup;
- if (xenParseXMDisk(conf, def, xendConfigVersion) < 0)
+ if (xenParseXMDisk(conf, def) < 0)
goto cleanup;
if (xenParseXMInputDevs(conf, def) < 0)
*/
virConfPtr
xenFormatXM(virConnectPtr conn,
- virDomainDefPtr def,
- int xendConfigVersion)
+ virDomainDefPtr def)
{
virConfPtr conf = NULL;
if (!(conf = virConfNew()))
goto cleanup;
- if (xenFormatConfigCommon(conf, def, conn, xendConfigVersion) < 0)
+ if (xenFormatConfigCommon(conf, def, conn) < 0)
goto cleanup;
if (xenFormatXMOS(conf, def) < 0)
goto cleanup;
- if (xenFormatXMDisks(conf, def, xendConfigVersion) < 0)
+ if (xenFormatXMDisks(conf, def) < 0)
goto cleanup;
if (xenFormatXMInputDevs(conf, def) < 0)
# include "virconf.h"
# include "domain_conf.h"
-virConfPtr xenFormatXM(virConnectPtr conn, virDomainDefPtr def,
- int xendConfigVersion);
+virConfPtr xenFormatXM(virConnectPtr conn, virDomainDefPtr def);
-virDomainDefPtr xenParseXM(virConfPtr conf, int xendConfigVersion,
+virDomainDefPtr xenParseXM(virConfPtr conf,
virCapsPtr caps, virDomainXMLOptionPtr xmlopt);
#endif /* __VIR_XEN_XM_H__ */
goto fail;
}
- if (!(conf = xenFormatXL(def, conn, 4)))
+ if (!(conf = xenFormatXL(def, conn)))
goto fail;
if (virConfWriteMem(gotxmcfgData, &wrote, conf) < 0)
if (!(conf = virConfReadMem(xmcfgData, strlen(xmcfgData), 0)))
goto fail;
- if (!(def = xenParseXL(conf, caps, xmlopt, 4)))
+ if (!(def = xenParseXL(conf, caps, xmlopt)))
goto fail;
if (!(gotxml = virDomainDefFormat(def, VIR_DOMAIN_XML_INACTIVE |
goto fail;
}
- if (!(conf = xenFormatXM(conn, def, 4)))
+ if (!(conf = xenFormatXM(conn, def)))
goto fail;
if (virConfWriteMem(gotxmcfgData, &wrote, conf) < 0)
if (!(conf = virConfReadMem(xmcfgData, strlen(xmcfgData), 0)))
goto fail;
- if (!(def = xenParseXM(conf, priv.xendConfigVersion,
- caps, xmlopt)))
+ if (!(def = xenParseXM(conf, caps, xmlopt)))
goto fail;
if (!(gotxml = virDomainDefFormat(def, VIR_DOMAIN_DEF_FORMAT_SECURE)))