| 153 | static int machine_parsable = 0; |
| 154 | |
| 155 | static void show_usage(const char *name) |
| 156 | { |
| 157 | printf("usage: \n"); |
| 158 | printf("%s <options>\n", name); |
| 159 | printf("\n"); |
| 160 | printf(" options:\n"); |
| 161 | printf("\n"); |
| 162 | printf(" -s show quorum status\n"); |
| 163 | printf(" -m constantly monitor quorum status\n"); |
| 164 | printf(" -l list nodes\n"); |
| 165 | printf(" -a show all names or addresses for each node\n"); |
| 166 | printf(" -p when used with -s or -l, generates machine parsable output\n"); |
| 167 | printf(" -v <votes> change the number of votes for a node (*)\n"); |
| 168 | printf(" -n <nodeid> optional nodeid of node for -v\n"); |
| 169 | printf(" -e <expected> change expected votes for the cluster (*)\n"); |
| 170 | printf(" -H show nodeids in hexadecimal rather than decimal\n"); |
| 171 | printf(" -i show node IP addresses instead of the resolved name\n"); |
| 172 | printf(" -o <a|n|i> order by [a] IP address (default), [n] name, [i] nodeid\n"); |
| 173 | printf(" -f forcefully unregister a quorum device *DANGEROUS* (*)\n"); |
| 174 | printf(" -h show this help text\n"); |
| 175 | printf(" -V show version and exit\n"); |
| 176 | printf("\n"); |
| 177 | printf(" (*) Starred items only work if votequorum is the quorum provider for corosync\n"); |
| 178 | printf("\n"); |
| 179 | } |
| 180 | |
| 181 | static int get_quorum_type(char *quorum_type, size_t quorum_type_len) |
| 182 | { |