From: Matthew Booth Date: Thu, 23 Jun 2011 03:28:29 +0000 (+0800) Subject: storage: fix volDelete return when volume still being allocated X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=10208cc50392572c65a737a43f590c9d8467d40f;p=libvirt.git storage: fix volDelete return when volume still being allocated volDelete used to return VIR_ERR_INTERNAL_ERROR when attempting to delete a volume which was still being allocated. It should return VIR_ERR_OPERATION_INVALID. * src/storage/storage_driver.c: Fix return of volDelete. --- diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 2da2feb6f8..f9652f858f 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -1583,7 +1583,7 @@ storageVolumeDownload(virStorageVolPtr obj, } if (vol->building) { - virStorageReportError(VIR_ERR_INTERNAL_ERROR, + virStorageReportError(VIR_ERR_OPERATION_INVALID, _("volume '%s' is still being allocated."), vol->name); goto out;