diff --git a/utils/src/quorum.c b/utils/src/quorum.c new file mode 100644 index 00000000..092c4f37 --- /dev/null +++ b/utils/src/quorum.c @@ -0,0 +1,10 @@ +#include "sparse.h" +#include "util.h" +#include "format.h" + +#include "quorum.h" + +bool quorum_slot_present(struct scoutfs_super_block *super, int i) +{ + return super->qconf.slots[i].addr.v4.family == cpu_to_le16(SCOUTFS_AF_IPV4); +} diff --git a/utils/src/quorum.h b/utils/src/quorum.h new file mode 100644 index 00000000..1297dce1 --- /dev/null +++ b/utils/src/quorum.h @@ -0,0 +1,8 @@ +#ifndef _QUORUM_H_ +#define _QUORUM_H_ + +#include + +bool quorum_slot_present(struct scoutfs_super_block *super, int i); + +#endif