| 501 | |
| 502 | |
| 503 | static void killnode_do(unsigned int nodeid) |
| 504 | { |
| 505 | cs_error_t result; |
| 506 | corosync_cfg_handle_t handle; |
| 507 | |
| 508 | printf ("Killing node " CS_PRI_NODE_ID "\n", nodeid); |
| 509 | result = corosync_cfg_initialize (&handle, NULL); |
| 510 | if (result != CS_OK) { |
| 511 | fprintf (stderr, "Could not initialize corosync configuration API error %d\n", result); |
| 512 | exit (EXIT_FAILURE); |
| 513 | } |
| 514 | result = corosync_cfg_kill_node (handle, nodeid, "Killed by corosync-cfgtool"); |
| 515 | if (result != CS_OK) { |
| 516 | fprintf (stderr, "Could not kill node (error = %s)\n", cs_strerror(result)); |
| 517 | exit(EXIT_FAILURE); |
| 518 | } |
| 519 | (void)corosync_cfg_finalize (handle); |
| 520 | } |
| 521 | |
| 522 | |
| 523 | static void usage_do (void) |
no test coverage detected