Skip to content

Commit

Permalink
tools/power turbostat: fix parameter passing for forked command
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Len Brown committed Jul 16, 2015
1 parent 6fb3143 commit a01e72f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/power/x86/turbostat/turbostat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit a01e72f

Please sign in to comment.