.. | .. |
---|
7 | 7 | */ |
---|
8 | 8 | #include "builtin.h" |
---|
9 | 9 | |
---|
10 | | -#include "perf.h" |
---|
11 | | - |
---|
12 | 10 | #include "util/cache.h" |
---|
13 | 11 | #include <subcmd/parse-options.h> |
---|
14 | | -#include "util/util.h" |
---|
15 | 12 | #include "util/debug.h" |
---|
16 | 13 | #include "util/config.h" |
---|
17 | 14 | #include <linux/string.h> |
---|
| 15 | +#include <stdio.h> |
---|
| 16 | +#include <stdlib.h> |
---|
18 | 17 | |
---|
19 | 18 | static bool use_system_config, use_user_config; |
---|
20 | 19 | |
---|
.. | .. |
---|
196 | 195 | pr_err("Error: takes no arguments\n"); |
---|
197 | 196 | parse_options_usage(config_usage, config_options, "l", 1); |
---|
198 | 197 | } else { |
---|
| 198 | +do_action_list: |
---|
199 | 199 | if (show_config(set) < 0) { |
---|
200 | 200 | pr_err("Nothing configured, " |
---|
201 | 201 | "please check your %s \n", config_filename); |
---|
.. | .. |
---|
204 | 204 | } |
---|
205 | 205 | break; |
---|
206 | 206 | default: |
---|
207 | | - if (!argc) { |
---|
208 | | - usage_with_options(config_usage, config_options); |
---|
209 | | - break; |
---|
210 | | - } |
---|
| 207 | + if (!argc) |
---|
| 208 | + goto do_action_list; |
---|
211 | 209 | |
---|
212 | 210 | for (i = 0; argv[i]; i++) { |
---|
213 | 211 | char *var, *value; |
---|