]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
esx: Don't treat an empty root snapshot list as error
authorChris Wong <wongc-redhat@hoku.net>
Wed, 21 Apr 2010 09:47:15 +0000 (11:47 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Wed, 21 Apr 2010 09:47:15 +0000 (11:47 +0200)
An empty root snapshot list was considered as error condition. Creating a
new snapshot would fail if the domain didn't have snapshots yet, because
the snapshot-create function tries to lookup the list of existing snapshots
in order to verify that the snapshot name is unique. This fails if the
domain doesn't have snapshots yet.

Removing the NULL check from esxVI_LookupRootSnapshotTreeList fixes this.

src/esx/esx_vi.c

index e405c8038fb4c5d45d78f50a7bcb1c7f7cf1a3dc..966ef85eb18770312332c8aaab89a3670b044dd1 100644 (file)
@@ -2503,12 +2503,6 @@ esxVI_LookupRootSnapshotTreeList
         }
     }
 
-    if (*rootSnapshotTreeList == NULL) {
-        ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, "%s",
-                     _("Could not lookup root snapshot list"));
-        goto failure;
-    }
-
   cleanup:
     esxVI_String_Free(&propertyNameList);
     esxVI_ObjectContent_Free(&virtualMachine);