ctdb-tools-ctdb: Generalise find_natgw() -> filter_nodemap_by_flags()
authorMartin Schwenke <martin@meltin.net>
Tue, 18 Feb 2014 06:11:53 +0000 (17:11 +1100)
committerAmitay Isaacs <amitay@samba.org>
Sun, 23 Mar 2014 03:20:14 +0000 (04:20 +0100)
commit33b1fcbd7083668cfd58b1cfb1172b6134cd07ca
treea9530a086a3d5a7cdd15a538e0c8f030ec541e62
parent798bd58370f6ea7bc70db96edd23ae86caf6bf79
ctdb-tools-ctdb: Generalise find_natgw() -> filter_nodemap_by_flags()

Instead of just finding the first node that doesn't have any flags in
flag_mask set, change it into a function that filters a nodemap to
exclude nodes with the given flags.

This makes the NATGW code simpler but also provides a function that
can be used in other code.

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