diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2011-04-19 20:33:50 +0200 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2011-07-29 18:35:39 +0200 |
commit | a1ce5ba2b7d08ab6347dc254f86f70e91c5f1a44 (patch) | |
tree | 22d59faf4df1547bb9547935c7f63c3ef6a6b387 /tools/power/cpupower/utils/cpupower-info.c | |
parent | 2cd005cac6d586b8ca324814a9c58ed0c08ffe40 (diff) | |
download | op-kernel-dev-a1ce5ba2b7d08ab6347dc254f86f70e91c5f1a44.zip op-kernel-dev-a1ce5ba2b7d08ab6347dc254f86f70e91c5f1a44.tar.gz |
cpupowerutils: utils - ConfigStyle bugfixes
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'tools/power/cpupower/utils/cpupower-info.c')
-rw-r--r-- | tools/power/cpupower/utils/cpupower-info.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/power/cpupower/utils/cpupower-info.c b/tools/power/cpupower/utils/cpupower-info.c index 7add04c..85253cb 100644 --- a/tools/power/cpupower/utils/cpupower-info.c +++ b/tools/power/cpupower/utils/cpupower-info.c @@ -30,10 +30,10 @@ void info_help(void) } static struct option set_opts[] = { - { .name="perf-bias", .has_arg=optional_argument, .flag=NULL, .val='b'}, - { .name="sched-mc", .has_arg=optional_argument, .flag=NULL, .val='m'}, - { .name="sched-smt", .has_arg=optional_argument, .flag=NULL, .val='s'}, - { .name="help", .has_arg=no_argument, .flag=NULL, .val='h'}, + { .name = "perf-bias", .has_arg = optional_argument, .flag = NULL, .val = 'b'}, + { .name = "sched-mc", .has_arg = optional_argument, .flag = NULL, .val = 'm'}, + { .name = "sched-smt", .has_arg = optional_argument, .flag = NULL, .val = 's'}, + { .name = "help", .has_arg = no_argument, .flag = NULL, .val = 'h'}, { }, }; @@ -57,12 +57,11 @@ int cmd_info(int argc, char **argv) int perf_bias:1; }; int params; - } params = {}; int ret = 0; setlocale(LC_ALL, ""); - textdomain (PACKAGE); + textdomain(PACKAGE); /* parameter parsing */ while ((ret = getopt_long(argc, argv, "msbh", set_opts, NULL)) != -1) { @@ -105,7 +104,7 @@ int cmd_info(int argc, char **argv) printf(_("not supported\n")); else printf("%d\n", ret); - } + } if (params.sched_smt) { ret = sysfs_get_sched("smt"); printf(_("System's thread sibling scheduler setting: ")); @@ -123,7 +122,7 @@ int cmd_info(int argc, char **argv) if (params.perf_bias) { if (!run_as_root) { params.perf_bias = 0; - printf (_("Intel's performance bias setting needs root privileges\n")); + printf(_("Intel's performance bias setting needs root privileges\n")); } else if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_PERF_BIAS)) { printf(_("System does not support Intel's performance" " bias setting\n")); @@ -134,7 +133,7 @@ int cmd_info(int argc, char **argv) /* loop over CPUs */ for (cpu = bitmask_first(cpus_chosen); cpu <= bitmask_last(cpus_chosen); cpu++) { - + if (!bitmask_isbitset(cpus_chosen, cpu) || cpufreq_cpu_exists(cpu)) continue; |