mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
tools/power turbostat: Fix child's argument forwarding
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: 3e4048466c ("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>
This commit is contained in:
committed by
Len Brown
parent
bcfab87108
commit
1da0daf746
@@ -9873,7 +9873,7 @@ void cmdline(int argc, char **argv)
|
||||
* Parse some options early, because they may make other options invalid,
|
||||
* like adding the MSR counter with --add and at the same time using --no-msr.
|
||||
*/
|
||||
while ((opt = getopt_long_only(argc, argv, "MPn:", long_options, &option_index)) != -1) {
|
||||
while ((opt = getopt_long_only(argc, argv, "+MPn:", long_options, &option_index)) != -1) {
|
||||
switch (opt) {
|
||||
case 'M':
|
||||
no_msr = 1;
|
||||
|
||||
Reference in New Issue
Block a user