virConfPtr xenFormatXL(virDomainDefPtr def, virConnectPtr conn, int xendConfigVersion) { virConfPtr conf = NULL; if (!(conf = virConfNew())) goto cleanup; if (xenFormatConfigCommon(conf, def, conn, xendConfigVersion) < 0) goto cleanup; if (xenFormatXLOS(conf, def) < 0) goto cleanup; if (xenFormatXLDomainDisks(conf, def) < 0) goto cleanup; if (xenFormatXLSpice(conf, def) < 0) goto cleanup; if (xenFormatXLInputDevs(conf, def) < 0) goto cleanup; return conf; cleanup: if (conf) virConfFree(conf); return NULL; }
virConfPtr xenFormatXL(virDomainDefPtr def, virConnectPtr conn) { virConfPtr conf = NULL; if (!(conf = virConfNew())) goto cleanup; if (xenFormatConfigCommon(conf, def, conn, XEN_CONFIG_FORMAT_XL) < 0) goto cleanup; if (xenFormatXLOS(conf, def) < 0) goto cleanup; if (xenFormatXLDomainDisks(conf, def) < 0) goto cleanup; if (xenFormatXLSpice(conf, def) < 0) goto cleanup; if (xenFormatXLInputDevs(conf, def) < 0) goto cleanup; if (xenFormatXLUSB(conf, def) < 0) goto cleanup; return conf; cleanup: if (conf) virConfFree(conf); return NULL; }
/* * Convert a virDomainDef object into an XM config record. */ virConfPtr xenFormatXM(virConnectPtr conn, virDomainDefPtr def) { virConfPtr conf = NULL; if (!(conf = virConfNew())) goto cleanup; if (xenFormatConfigCommon(conf, def, conn) < 0) goto cleanup; if (xenFormatXMOS(conf, def) < 0) goto cleanup; if (xenFormatXMDisks(conf, def) < 0) goto cleanup; if (xenFormatXMInputDevs(conf, def) < 0) goto cleanup; return conf; cleanup: if (conf) virConfFree(conf); return NULL; }