]> xenbits.xensource.com Git - libvirt.git/commitdiff
phyp: avoid a logic bug
authorEric Blake <eblake@redhat.com>
Thu, 14 Apr 2011 16:35:42 +0000 (10:35 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 15 Apr 2011 21:26:26 +0000 (15:26 -0600)
Ever since commit ebc46f, the destroy function built two command
variants but only used one.  I went with the variant that matches
the idiom used in the counterpart of phypBuildStoragePool.

* src/phyp/phyp_driver.c (phypDestroyStoragePool): Avoid
clobbering cmd.  Fix error message typo.

src/phyp/phyp_driver.c

index 5742d957ef39088ee4e01e7e1284f790a3c703fc..7aa494d84aa70a4c53f190f237dcb4a9c94f449a 100644 (file)
@@ -2936,19 +2936,10 @@ phypDestroyStoragePool(virStoragePoolPtr pool)
         return -1;
     }
     cmd = virBufferContentAndReset(&buf);
-
-    if (virAsprintf(&cmd,
-                    "viosvrcmd -m %s --id %d -c "
-                    "'rmsp %s'", managed_system, vios_id,
-                    pool->name) < 0) {
-        virReportOOMError();
-        goto cleanup;
-    }
-
     ret = phypExec(session, cmd, &exit_status, conn);
 
     if (exit_status < 0) {
-        VIR_ERROR(_("Unable to create Storage Pool: %s"), ret);
+        VIR_ERROR(_("Unable to destroy Storage Pool: %s"), ret);
         goto cleanup;
     }