From 10208cc50392572c65a737a43f590c9d8467d40f Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Thu, 23 Jun 2011 11:28:29 +0800 Subject: [PATCH] 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. --- src/storage/storage_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2