summaryrefslogtreecommitdiff
path: root/rust/helpers/security.c
diff options
context:
space:
mode:
authorKaushlendra Kumar <kaushlendra.kumar@intel.com>2025-08-09 10:35:15 +0530
committerLen Brown <len.brown@intel.com>2025-09-25 23:12:00 -0400
commitcafb47be3f38ad81306bf894e743bebc2ccf66ab (patch)
tree1f65e13d33708586e673e7e596b596e882853c43 /rust/helpers/security.c
parent038d61fd642278bab63ee8ef722c50d10ab01e8f (diff)
tools/power turbostat: Fix incorrect sorting of PMT telemetry
The pmt_telemdir_sort() comparison function was returning a boolean value (0 or 1) instead of the required negative, zero, or positive value for proper sorting. This caused unpredictable and incorrect ordering of telemetry directories named telem0, telem1, ..., telemN. Update the comparison logic to return -1, 0, or 1 based on the numerical value extracted from the directory name, ensuring correct numerical ordering when using scandir. This change improves stability and correctness when iterating PMT telemetry directories. Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'rust/helpers/security.c')
0 files changed, 0 insertions, 0 deletions