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)
commit4ca50c7243dfd3e820d730f18052a4e5f90d3622
tree3218facf1b8d8c038992464dedb33a76a389550d
parentd8a3ec42c16b584eff5baaea572e34579c0f58a5
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>
(This used to be ctdb commit ca6e7eccc90f2869c220231666bf284798342bce)
ctdb/tools/ctdb.c