tools/thermal: tmon: fixup tui windowing calculations
The number of rows in the dialog vary according to the number of cooling devices. However, some of the windowing computations were assuming a fixed number of rows. This computation is OK when we have between 4 and 9 cooling devices (and they wrap to the next column), but with fewer devices, we end up printing off the end of the window. This unifies the row computation into a single function and uses that throughout the TUI code. This also accounts for increasing the number of rows when there are more than 9 total cooling devices. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Acked-by: NJacob Pan <jacob.jun.pan@linux.intel.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
Showing
想要评论请 注册 或 登录