| 445 | } |
| 446 | |
| 447 | static struct arg_item *get_conf_item(const char *name) |
| 448 | { |
| 449 | struct list_head *pos; |
| 450 | struct arg_item *item; |
| 451 | |
| 452 | /* Look up item with same name */ |
| 453 | list_for_each(pos, &conf_head) { |
| 454 | item = list_entry(pos, struct arg_item, list); |
| 455 | if (!strcasecmp(item->conf.name, name)) |
| 456 | return item; |
| 457 | } |
| 458 | |
| 459 | /* Item does not already exists, create it */ |
| 460 | CALLOC_ARRAY(item, 1); |
| 461 | duplicate_conf(&item->conf, &default_conf_info); |
| 462 | item->conf.name = xstrdup(name); |
| 463 | |
| 464 | list_add_tail(&item->list, &conf_head); |
| 465 | |
| 466 | return item; |
| 467 | } |
| 468 | |
| 469 | enum trailer_info_type { TRAILER_KEY, TRAILER_COMMAND, TRAILER_CMD, |
| 470 | TRAILER_WHERE, TRAILER_IF_EXISTS, TRAILER_IF_MISSING }; |
no test coverage detected