Patch "tools/power turbostat: option '-n' is ambiguous" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tools/power turbostat: option '-n' is ambiguous

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tools-power-turbostat-option-n-is-ambiguous.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 4c14994110232e9a0818ba3ec247f3f8f2d3d405
Author: David Arcari <darcari@xxxxxxxxxx>
Date:   Mon May 20 14:57:49 2024 -0400

    tools/power turbostat: option '-n' is ambiguous
    
    [ Upstream commit ebb5b260af67c677700cd51be6845c2cab3edfbd ]
    
    In some cases specifying the '-n' command line argument will cause
    turbostat to fail.  For instance 'turbostat -n 1' works fine; however,
    'turbostat -n 1 -d' will fail.  This is the result of the first call
    to getopt_long_only() where "MP" is specified as the optstring.  This can
    be easily fixed by changing the optstring from "MP" to "MPn:" to remove
    ambiguity between the arguments.
    
    tools/power turbostat: option '-n' is ambiguous; possibilities: '-num_iterations' '-no-msr' '-no-perf'
    
    Fixes: a0e86c90b83c ("tools/power turbostat: Add --no-perf option")
    
    Signed-off-by: David Arcari <darcari@xxxxxxxxxx>
    Signed-off-by: Len Brown <len.brown@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 98256468e2480..8071a3ef2a2e8 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -7851,7 +7851,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, "MP", 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;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux