- 28 2月, 2015 4 次提交
-
-
由 Brian Norris 提交于
gcc complains about the 'cols' variable being unused. This is unavoidable, given the ncurses getmaxyx() macro-based API, which wants to assign to a variable directly, even when we're not going to use it. Warning: gcc -O1 -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int -fstack-protector -D VERSION=\"1.0\" -c -o tui.o tui.c tui.c: In function ‘show_dialogue’: tui.c:288:12: warning: variable ‘cols’ set but not used [-Wunused-but-set-variable] int rows, cols; ^ So, add a hack to get rid of that warning. 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>
-
由 Brian Norris 提交于
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>
-
由 Brian Norris 提交于
We can use the ncurses API to get the number of rows. 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>
-
由 Brian Norris 提交于
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>
-
- 07 11月, 2013 1 次提交
-
-
由 Jacob Pan 提交于
Increasingly, Linux is running on thermally constrained devices. The simple thermal relationship between processor and fan has become past for modern computers. As hardware vendors cope with the thermal constraints on their products, more sensors are added, new cooling capabilities are introduced. The complexity of the thermal relationship can grow exponentially among cooling devices, zones, sensors, and trip points. They can also change dynamically. To expose such relationship to the userspace, Linux generic thermal layer introduced sysfs entry at /sys/class/thermal with a matrix of symbolic links, trip point bindings, and device instances. To traverse such matrix by hand is not a trivial task. Testing is also difficult in that thermal conditions are often exception cases that hard to reach in normal operations. TMON is conceived as a tool to help visualize, tune, and test the complex thermal subsystem. Signed-off-by: NJacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-