1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-04-01 20:05:19 +00:00

virLockManagerSanlockAddResource: Do not ignore unknown resource types

Currently, there are only two types of resource. So effectively
this is a dead code. However, that assumption can change and we
shouldn't just silently ignore the error.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Michal Privoznik 2018-08-22 11:59:45 +02:00
parent afe3f87aad
commit db75a8fb9d

View File

@ -829,8 +829,10 @@ static int virLockManagerSanlockAddResource(virLockManagerPtr lock,
break;
default:
/* Ignore other resources, without error */
break;
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unknown lock manager object type %d for domain lock object"),
type);
return -1;
}
return 0;