]> xenbits.xensource.com Git - libvirt.git/commitdiff
Small cleanups in test driver VolCreateXML
authorCole Robinson <crobinso@redhat.com>
Tue, 5 May 2009 14:19:59 +0000 (14:19 +0000)
committerCole Robinson <crobinso@redhat.com>
Tue, 5 May 2009 14:19:59 +0000 (14:19 +0000)
ChangeLog
src/test.c

index c1b3fe7eab94d006bc93a0ea1f21ea55c6056a11..0195a108ba98d993994093e65a564d7386763cd0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue May  5 10:19:14 EDT 2009 Cole Robinson <crobinso@redhat.com>
+
+       * src/test.c: Small cleanups in test driver VolCreateXML
+
 Tue May  5 10:18:15 EDT 2009 Cole Robinson <crobinso@redhat.com>
 
        * src/storage_driver.c: Remove some debug code from storage_driver.c
index a518737d65de3d8106521fc5f03b7120e31ca794..1915b573bced765f7c14ffe49565419cd307581a 100644 (file)
@@ -3076,20 +3076,18 @@ testStorageVolumeCreateXML(virStoragePoolPtr pool,
         goto cleanup;
     }
 
-
     if (!virStoragePoolObjIsActive(privpool)) {
         testError(pool->conn, VIR_ERR_INTERNAL_ERROR,
                   _("storage pool '%s' is not active"), pool->name);
         goto cleanup;
     }
 
-
     privvol = virStorageVolDefParse(pool->conn, privpool->def, xmldesc, NULL);
     if (privvol == NULL)
         goto cleanup;
 
     if (virStorageVolDefFindByName(privpool, privvol->name)) {
-        testError(pool->conn, VIR_ERR_INVALID_STORAGE_POOL,
+        testError(pool->conn, VIR_ERR_INVALID_STORAGE_VOL,
                   "%s", _("storage vol already exists"));
         goto cleanup;
     }
@@ -3102,8 +3100,6 @@ testStorageVolumeCreateXML(virStoragePoolPtr pool,
                   privvol->name);
         goto cleanup;
     }
-    privpool->def->available = (privpool->def->capacity -
-                                privpool->def->allocation);
 
     if (VIR_REALLOC_N(privpool->volumes.objs,
                       privpool->volumes.count+1) < 0) {