| 1472 | } |
| 1473 | |
| 1474 | action_t * |
| 1475 | get_pseudo_op(const char *name, pe_working_set_t * data_set) |
| 1476 | { |
| 1477 | action_t *op = NULL; |
| 1478 | const char *op_s = name; |
| 1479 | GListPtr possible_matches = NULL; |
| 1480 | |
| 1481 | possible_matches = find_actions(data_set->actions, name, NULL); |
| 1482 | if (possible_matches != NULL) { |
| 1483 | if (g_list_length(possible_matches) > 1) { |
| 1484 | pe_warn("Action %s exists %d times", name, g_list_length(possible_matches)); |
| 1485 | } |
| 1486 | |
| 1487 | op = g_list_nth_data(possible_matches, 0); |
| 1488 | g_list_free(possible_matches); |
| 1489 | |
| 1490 | } else { |
| 1491 | op = custom_action(NULL, strdup(op_s), op_s, NULL, TRUE, TRUE, data_set); |
| 1492 | set_bit(op->flags, pe_action_pseudo); |
| 1493 | set_bit(op->flags, pe_action_runnable); |
| 1494 | } |
| 1495 | |
| 1496 | return op; |
| 1497 | } |
| 1498 | |
| 1499 | void |
| 1500 | destroy_ticket(gpointer data) |
no test coverage detected