From: Len Brown Date: Thu, 16 Jul 2015 01:49:41 +0000 (-0400) Subject: tools/power turbostat: fix parameter passing for forked command X-Git-Tag: v4.1.12-92~24^2~55 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0bbe30317f345c99698b8443e7c214d87115beba;p=users%2Fjedix%2Flinux-maple.git tools/power turbostat: fix parameter passing for forked command Orabug: 24811361 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 Signed-off-by: Len Brown (cherry picked from commit a01e72fbc41e322ed229465de8b595a7e3ec6549) Signed-off-by: Brian Maly Signed-off-by: Dhaval Giani --- diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 5a793bed453a3..915eb2846a2d6 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -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':