tools/ctdb: Re-factor code to check if db exists given name or id
authorAmitay Isaacs <amitay@gmail.com>
Wed, 19 Dec 2012 03:43:26 +0000 (14:43 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Wed, 9 Jan 2013 02:18:33 +0000 (13:18 +1100)
commitca6e7eccc90f2869c220231666bf284798342bce
treed96635ccf46ea6b077c7affdcb170d85c7ca79a8
parentd23adec89b69e7c6f96c8e1417ef4ca4c9edc57e
tools/ctdb: Re-factor code to check if db exists given name or id

Most of the commands related to database operations can now use the
common code (db_exists()) to refer to database with either name or id.

In addition to return db_id for db_name, the function returns all the
flags set for the database.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
tools/ctdb.c