diff options
Diffstat (limited to 'tools/power/cpupower/utils/cpuidle-info.c')
-rw-r--r-- | tools/power/cpupower/utils/cpuidle-info.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/tools/power/cpupower/utils/cpuidle-info.c b/tools/power/cpupower/utils/cpuidle-info.c index 70da3574f1e..b028267c137 100644 --- a/tools/power/cpupower/utils/cpuidle-info.c +++ b/tools/power/cpupower/utils/cpuidle-info.c | |||
@@ -139,30 +139,14 @@ static void proc_cpuidle_cpu_output(unsigned int cpu) | |||
139 | } | 139 | } |
140 | } | 140 | } |
141 | 141 | ||
142 | /* --freq / -f */ | ||
143 | |||
144 | void idle_info_help(void) | ||
145 | { | ||
146 | printf(_ ("Usage: cpupower idleinfo [options]\n")); | ||
147 | printf(_ ("Options:\n")); | ||
148 | printf(_ (" -s, --silent Only show general C-state information\n")); | ||
149 | printf(_ (" -o, --proc Prints out information like provided by the /proc/acpi/processor/*/power\n" | ||
150 | " interface in older kernels\n")); | ||
151 | printf(_ (" -h, --help Prints out this screen\n")); | ||
152 | |||
153 | printf("\n"); | ||
154 | } | ||
155 | |||
156 | static struct option info_opts[] = { | 142 | static struct option info_opts[] = { |
157 | { .name = "silent", .has_arg = no_argument, .flag = NULL, .val = 's'}, | 143 | { .name = "silent", .has_arg = no_argument, .flag = NULL, .val = 's'}, |
158 | { .name = "proc", .has_arg = no_argument, .flag = NULL, .val = 'o'}, | 144 | { .name = "proc", .has_arg = no_argument, .flag = NULL, .val = 'o'}, |
159 | { .name = "help", .has_arg = no_argument, .flag = NULL, .val = 'h'}, | ||
160 | { }, | 145 | { }, |
161 | }; | 146 | }; |
162 | 147 | ||
163 | static inline void cpuidle_exit(int fail) | 148 | static inline void cpuidle_exit(int fail) |
164 | { | 149 | { |
165 | idle_info_help(); | ||
166 | exit(EXIT_FAILURE); | 150 | exit(EXIT_FAILURE); |
167 | } | 151 | } |
168 | 152 | ||
@@ -174,7 +158,7 @@ int cmd_idle_info(int argc, char **argv) | |||
174 | unsigned int cpu = 0; | 158 | unsigned int cpu = 0; |
175 | 159 | ||
176 | do { | 160 | do { |
177 | ret = getopt_long(argc, argv, "hos", info_opts, NULL); | 161 | ret = getopt_long(argc, argv, "os", info_opts, NULL); |
178 | if (ret == -1) | 162 | if (ret == -1) |
179 | break; | 163 | break; |
180 | switch (ret) { | 164 | switch (ret) { |
@@ -182,10 +166,6 @@ int cmd_idle_info(int argc, char **argv) | |||
182 | output_param = '?'; | 166 | output_param = '?'; |
183 | cont = 0; | 167 | cont = 0; |
184 | break; | 168 | break; |
185 | case 'h': | ||
186 | output_param = 'h'; | ||
187 | cont = 0; | ||
188 | break; | ||
189 | case 's': | 169 | case 's': |
190 | verbose = 0; | 170 | verbose = 0; |
191 | break; | 171 | break; |
@@ -211,8 +191,6 @@ int cmd_idle_info(int argc, char **argv) | |||
211 | case '?': | 191 | case '?': |
212 | printf(_("invalid or unknown argument\n")); | 192 | printf(_("invalid or unknown argument\n")); |
213 | cpuidle_exit(EXIT_FAILURE); | 193 | cpuidle_exit(EXIT_FAILURE); |
214 | case 'h': | ||
215 | cpuidle_exit(EXIT_SUCCESS); | ||
216 | } | 194 | } |
217 | 195 | ||
218 | /* Default is: show output of CPU 0 only */ | 196 | /* Default is: show output of CPU 0 only */ |