Skip to content

Commit 522586a

Browse files
praritandy-shev
authored andcommitted
tools/power/x86/intel-speed-select: Output success/failed for command output
Command output has confusing data, returning "0" on success. For example |# ./intel-speed-select -c 14 turbo-freq enable Intel(R) Speed Select Technology Executing on CPU model:106[0x6a] package-1 die-0 cpu-14 turbo-freq enable:0 To avoid confusion change the command output to 'success' or 'failed'. v2: Remove help output line. Signed-off-by: Prarit Bhargava <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Cc: Srinivas Pandruvada <[email protected]> Cc: David Arcari <[email protected]> Cc: [email protected] Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 49aed15 commit 522586a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tools/power/x86/intel-speed-select/isst-config.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,6 @@ static void usage(void)
15141514
printf("\tResult display uses a common format for each command:\n");
15151515
printf("\tResults are formatted in text/JSON with\n");
15161516
printf("\t\tPackage, Die, CPU, and command specific results.\n");
1517-
printf("\t\t\tFor Set commands, status is 0 for success and rest for failures\n");
15181517
exit(1);
15191518
}
15201519

tools/power/x86/intel-speed-select/isst-display.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,10 @@ void isst_display_result(int cpu, FILE *outf, char *feature, char *cmd,
519519
snprintf(header, sizeof(header), "%s", feature);
520520
format_and_print(outf, 4, header, NULL);
521521
snprintf(header, sizeof(header), "%s", cmd);
522-
snprintf(value, sizeof(value), "%d", result);
522+
if (!result)
523+
snprintf(value, sizeof(value), "success");
524+
else
525+
snprintf(value, sizeof(value), "failed(error %d)", result);
523526
format_and_print(outf, 5, header, value);
524527

525528
format_and_print(outf, 1, NULL, NULL);

0 commit comments

Comments
 (0)