|
@@ -37,23 +37,16 @@ static int show_config(struct perf_config_set *set)
|
|
|
{
|
|
|
struct perf_config_section *section;
|
|
|
struct perf_config_item *item;
|
|
|
- struct list_head *sections;
|
|
|
|
|
|
if (set == NULL)
|
|
|
return -1;
|
|
|
|
|
|
- sections = &set->sections;
|
|
|
- if (list_empty(sections))
|
|
|
- return -1;
|
|
|
-
|
|
|
- list_for_each_entry(section, sections, node) {
|
|
|
- list_for_each_entry(item, §ion->items, node) {
|
|
|
- char *value = item->value;
|
|
|
+ perf_config_set__for_each_entry(set, section, item) {
|
|
|
+ char *value = item->value;
|
|
|
|
|
|
- if (value)
|
|
|
- printf("%s.%s=%s\n", section->name,
|
|
|
- item->name, value);
|
|
|
- }
|
|
|
+ if (value)
|
|
|
+ printf("%s.%s=%s\n", section->name,
|
|
|
+ item->name, value);
|
|
|
}
|
|
|
|
|
|
return 0;
|