char *
-virDomainSnapshotDefFormat(const char *domain_uuid,
+virDomainSnapshotDefFormat(const char *uuidstr,
virDomainSnapshotDefPtr def,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
if (def->dom) {
if (virDomainDefFormatInternal(def->dom, caps, flags, &buf, xmlopt) < 0)
goto error;
- } else if (domain_uuid) {
+ } else if (uuidstr) {
virBufferAddLit(&buf, "<domain>\n");
virBufferAdjustIndent(&buf, 2);
- virBufferAsprintf(&buf, "<uuid>%s</uuid>\n", domain_uuid);
+ virBufferAsprintf(&buf, "<uuid>%s</uuid>\n", uuidstr);
virBufferAdjustIndent(&buf, -2);
virBufferAddLit(&buf, "</domain>\n");
}
int ret = -1;
int align_location = VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL;
bool align_match = true;
- char uuidstr[VIR_UUID_STRING_BUFLEN];
virDomainSnapshotObjPtr other;
- virUUIDFormat(domain->uuid, uuidstr);
-
/* Prevent circular chains */
if (def->parent) {
if (STREQ(def->name, def->parent)) {
if (def->dom &&
memcmp(def->dom->uuid, domain->uuid, VIR_UUID_BUFLEN)) {
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+
+ virUUIDFormat(domain->uuid, uuidstr);
virReportError(VIR_ERR_INVALID_ARG,
_("definition for snapshot %s must use uuid %s"),
def->name, uuidstr);
virDomainXMLOptionPtr xmlopt,
unsigned int flags);
void virDomainSnapshotDefFree(virDomainSnapshotDefPtr def);
-char *virDomainSnapshotDefFormat(const char *domain_uuid,
+char *virDomainSnapshotDefFormat(const char *uuidstr,
virDomainSnapshotDefPtr def,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,