]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: Fix error retval for getDeviceType
authorJohn Ferlan <jferlan@redhat.com>
Tue, 12 Feb 2019 12:00:38 +0000 (07:00 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 12 Feb 2019 13:51:23 +0000 (08:51 -0500)
commit65fc17d2f629317c1c4ec7b41109dcf6e3a95cd2
treee18df046ffc67d461b5ac2c49d104dfffb9a0710
parentb330600a6955e3807d81cc400b163cc4df6fcf51
storage: Fix error retval for getDeviceType

On error from virAsprintf we would erroneously return 0 with
the @*type not being set. Change to a return -1 on error like
we should have been doing.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/storage/storage_util.c