| 365 | } |
| 366 | |
| 367 | enum rsc_role_e |
| 368 | text2role(const char *role) |
| 369 | { |
| 370 | CRM_ASSERT(role != NULL); |
| 371 | if (safe_str_eq(role, RSC_ROLE_STOPPED_S)) { |
| 372 | return RSC_ROLE_STOPPED; |
| 373 | } else if (safe_str_eq(role, RSC_ROLE_STARTED_S)) { |
| 374 | return RSC_ROLE_STARTED; |
| 375 | } else if (safe_str_eq(role, RSC_ROLE_SLAVE_S)) { |
| 376 | return RSC_ROLE_SLAVE; |
| 377 | } else if (safe_str_eq(role, RSC_ROLE_MASTER_S)) { |
| 378 | return RSC_ROLE_MASTER; |
| 379 | } else if (safe_str_eq(role, RSC_ROLE_UNKNOWN_S)) { |
| 380 | return RSC_ROLE_UNKNOWN; |
| 381 | } |
| 382 | crm_err("Unknown role: %s", role); |
| 383 | return RSC_ROLE_UNKNOWN; |
| 384 | } |
| 385 | |
| 386 | int |
| 387 | merge_weights(int w1, int w2) |
no outgoing calls