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.
This commit is contained in:
Matthew Booth 2011-06-23 11:28:29 +08:00 committed by Daniel Veillard
parent 60bfd5b565
commit 10208cc503

View File

@ -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;