Skip to content

Commit

Permalink
src/devices/ahci.cpp: fix: Remove the humanname from ahci_data array
Browse files Browse the repository at this point in the history
Device stats tab reports humanname for ahci and the purpose of having
a humanname is to identify ahci data clearly in the powertop report.
However, the printf() that is responsible for printing the humanname
spams the device stats tab and tunables tab for every auto refresh of
the window.

To fix this glitch, remove the humanname from the ahci_data array.

Signed-off-by: Gayatri Kammela <[email protected]>
  • Loading branch information
gkammela authored and nswamina committed Sep 26, 2019
1 parent 8539ffa commit 397b746
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/devices/ahci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,6 @@ void ahci::report_device_stats(string *ahci_data, int idx)
double slumber_util = get_result_value(slumber_rindex, &all_results);
double devslp_util = get_result_value(devslp_rindex, &all_results);

ahci_data[offset]=humanname;
printf("\nData from ahci %s\n",ahci_data[offset].c_str());
offset +=1;

snprintf(util, sizeof(util), "%5.1f", active_util);
ahci_data[offset]= util;
offset +=1;
Expand Down

0 comments on commit 397b746

Please sign in to comment.