]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
snapshot: fix regression with system checkpoints
authorEric Blake <eblake@redhat.com>
Thu, 8 Sep 2011 13:06:45 +0000 (14:06 +0100)
committerEric Blake <eblake@redhat.com>
Thu, 8 Sep 2011 13:51:48 +0000 (14:51 +0100)
Regression introduced in commit d6f6b2d194c.  Running
'virsh snapshot-create dom' would mistakenly report that
disks can only be specified for disk snapshots.

* src/conf/domain_conf.c (virDomainSnapshotDefParseString): Only
give error about no disk support when <disk> was found.

src/conf/domain_conf.c

index 74f8d6aec3090f06d4cfb2fe52aed6de7a1a7edc..560c77354c19ab39b425f4e5d250ba3dba8cd8ca 100644 (file)
@@ -11622,7 +11622,7 @@ virDomainSnapshotDefParseString(const char *xmlStr,
                 goto cleanup;
         }
         VIR_FREE(nodes);
-    } else {
+    } else if (i) {
         virDomainReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
                              _("unable to handle disk requests in snapshot"));
         goto cleanup;