]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Fix virStorageBackendSCSINewLun error handling
authorJohn Ferlan <jferlan@redhat.com>
Fri, 8 Feb 2019 15:25:27 +0000 (10:25 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 12 Feb 2019 13:51:23 +0000 (08:51 -0500)
commitb330600a6955e3807d81cc400b163cc4df6fcf51
tree0e05c1849eb6d878451659893d614cab9baad96d
parent38362460ddadb8449ad5c07403e613152c48bdc7
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>
src/storage/storage_util.c