Skip to content

Commit a14ab9f

Browse files
Patryk Wlazlyngregkh
authored andcommitted
tools/power turbostat: Fix child's argument forwarding
[ Upstream commit 1da0daf ] Add '+' to optstring when early scanning for --no-msr and --no-perf. It causes option processing to stop as soon as a nonoption argument is encountered, effectively skipping child's arguments. Fixes: 3e40484 ("tools/power turbostat: Add --no-msr option") Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a109b53 commit a14ab9f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/power/x86/turbostat/turbostat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9784,7 +9784,7 @@ void cmdline(int argc, char **argv)
97849784
* Parse some options early, because they may make other options invalid,
97859785
* like adding the MSR counter with --add and at the same time using --no-msr.
97869786
*/
9787-
while ((opt = getopt_long_only(argc, argv, "MPn:", long_options, &option_index)) != -1) {
9787+
while ((opt = getopt_long_only(argc, argv, "+MPn:", long_options, &option_index)) != -1) {
97889788
switch (opt) {
97899789
case 'M':
97909790
no_msr = 1;

0 commit comments

Comments
 (0)