From: Michal Privoznik Date: Wed, 22 Aug 2018 09:59:45 +0000 (+0200) Subject: virLockManagerSanlockAddResource: Do not ignore unknown resource types X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=db75a8fb9d78656b9e5b02c5f163e0364d3d3c67;p=libvirt.git 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 Reviewed-by: John Ferlan --- diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index 3e5f0e37b0..39c2f94a76 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@ -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;