[PATCH 1/3] tools/power/x86/intel-speed-select: Fix some program return value
From: Zhang Rui
Date: Thu Mar 19 2026 - 01:55:30 EST
When running the "intel-speed-select -h" command, it returns
1. 0 when using a version that is API incompatible.
2. 1 when using a version that is API compatible.
And this is confusing.
Fix the program to return 0 for "-h" parameter, and return 1 whenever
"Incompatible API versions" is detected.
Signed-off-by: Zhang Rui <rui.zhang@xxxxxxxxx>
---
tools/power/x86/intel-speed-select/isst-config.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c
index dd9056ddb016..bd9f7a1d385e 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -1138,7 +1138,7 @@ static int isst_fill_platform_info(void)
if (isst_platform_info.api_version > supported_api_ver) {
printf("Incompatible API versions; Upgrade of tool is required\n");
- return -1;
+ exit(1);
}
set_platform_ops:
@@ -3191,7 +3191,7 @@ static void usage(void)
printf("\tTo get full turbo-freq information dump:\n");
printf("\t\tintel-speed-select turbo-freq info -l 0\n");
}
- exit(1);
+ exit(0);
}
static void print_version(void)
--
2.43.0