]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tools/power turbostat: fix parameter passing for forked command
authorLen Brown <len.brown@intel.com>
Thu, 16 Jul 2015 01:49:41 +0000 (21:49 -0400)
committerLen Brown <len.brown@intel.com>
Thu, 16 Jul 2015 01:49:41 +0000 (21:49 -0400)
turbostat supports forked command when sampling cpu state. However,
the forked command is not allowed to be executed with options, otherwise
turbostat might regard these options as invalid turbostat options.

For example:

./turbostat stress -c 4 -t 10
./turbostat: unrecognized option '-t'

Reported-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c

index 5a793bed453a30134f4d2ec542e44c4067d49b73..915eb2846a2d6ae89eae6622bf2548e9999882f2 100644 (file)
@@ -3118,7 +3118,7 @@ void cmdline(int argc, char **argv)
 
        progname = argv[0];
 
-       while ((opt = getopt_long_only(argc, argv, "C:c:Ddhi:JM:m:PpST:v",
+       while ((opt = getopt_long_only(argc, argv, "+C:c:Ddhi:JM:m:PpST:v",
                                long_options, &option_index)) != -1) {
                switch (opt) {
                case 'C':