| 319 | } |
| 320 | |
| 321 | static int |
| 322 | dump_resource(const char *rsc, pe_working_set_t * data_set, gboolean expanded) |
| 323 | { |
| 324 | char *rsc_xml = NULL; |
| 325 | resource_t *the_rsc = find_rsc_or_clone(rsc, data_set); |
| 326 | |
| 327 | if (the_rsc == NULL) { |
| 328 | return -ENXIO; |
| 329 | } |
| 330 | the_rsc->fns->print(the_rsc, NULL, pe_print_printf, stdout); |
| 331 | |
| 332 | if (expanded) { |
| 333 | rsc_xml = dump_xml_formatted(the_rsc->xml); |
| 334 | } else { |
| 335 | if (the_rsc->orig_xml) { |
| 336 | rsc_xml = dump_xml_formatted(the_rsc->orig_xml); |
| 337 | } else { |
| 338 | rsc_xml = dump_xml_formatted(the_rsc->xml); |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | fprintf(stdout, "%sxml:\n%s\n", expanded ? "" : "raw ", rsc_xml); |
| 343 | |
| 344 | free(rsc_xml); |
| 345 | |
| 346 | return 0; |
| 347 | } |
| 348 | |
| 349 | static int |
| 350 | dump_resource_attr(const char *rsc, const char *attr, pe_working_set_t * data_set) |
no test coverage detected