mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 16:45:20 +00:00
util: Fix virStorageBackendSCSINewLun error handling
Commit a523770c3 added @retval return processing for virStorageBackendUpdateVolInfo in order to allow a -2 to be return; however, upon successful completion @retval = 0 and if either the virStorageBackendSCSISerial or the virStoragePoolObjAddVol failed, the method would return 0, but not add the @vol to the pool. So let's just reset retval = -1 and continue processing. Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
38362460dd
commit
b330600a69
@ -3869,6 +3869,9 @@ virStorageBackendSCSINewLun(virStoragePoolObjPtr pool,
|
|||||||
VIR_STORAGE_VOL_READ_NOERROR)) < 0)
|
VIR_STORAGE_VOL_READ_NOERROR)) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
/* Reset retval for proper error handling */
|
||||||
|
retval = -1;
|
||||||
|
|
||||||
vol->key = virStorageBackendSCSISerial(vol->target.path,
|
vol->key = virStorageBackendSCSISerial(vol->target.path,
|
||||||
(def->source.adapter.type ==
|
(def->source.adapter.type ==
|
||||||
VIR_STORAGE_ADAPTER_TYPE_FC_HOST));
|
VIR_STORAGE_ADAPTER_TYPE_FC_HOST));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user