ctdb-recovery: Negate the status when checking the recovery lock
authorMartin Schwenke <martin@meltin.net>
Thu, 28 Jan 2016 04:07:30 +0000 (15:07 +1100)
committerAmitay Isaacs <amitay@samba.org>
Tue, 23 Feb 2016 06:23:18 +0000 (07:23 +0100)
commit188019b877fb797e7da460028c5ec6f98f691877
tree80028970581c92484a63b28342bce872091f41ed
parentfad3f367b77b120e2d0fc31cc2d87f46614dd266
ctdb-recovery: Negate the status when checking the recovery lock

Have 0 indicate that the lock was taken.  This allows non-zero values
to be used to indicate why the lock could not be taken.  EACCES means
lock contention.

For now use just EACCES to cover all failures, since
ctdb_recovery_lock() returns a bool and details of other errors will
be lost.  ctdb_recovery_lock() will undergo some big changes, so don't
try to fix this now.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_recover.c