[libvirt] [PATCH 1/7] util: Alter virObjectLockRead to return status

Pavel Hrdina phrdina at redhat.com
Fri Jul 28 16:56:53 UTC 2017


On Fri, Jul 28, 2017 at 12:38:55PM -0400, John Ferlan wrote:
> Rather than ignore errors, let's have virObjectLockRead check for
> the correct usage and issue an error when not properly used so
> so that we don't run into situations where the resource we think
> we're locking really isn't locked because the void input parameter
> wasn't valid.

I agree with Dan that this doesn't give any benefit.  We should rather
consider start using abort() since this is a programming error, not
something that depends on an input from user.  It should not happen if
if it does we have serious issues and abort is a best choice.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170728/8a7a00c7/attachment-0001.sig>


More information about the libvir-list mailing list