diff options
author | Thara Gopinath <thara.gopinath@linaro.org> | 2017-07-14 13:15:48 -0400 |
---|---|---|
committer | Lisa Nguyen <lisa.nguyen@linaro.org> | 2017-09-19 12:59:40 -0700 |
commit | 1a32ec046dbb85823eeb2fb965a594614473d719 (patch) | |
tree | 92c1ccb5a5a90c39c7cc742f3dd95d43c853abbc | |
parent | ce1acda61617d3ab02087f97a6b073b460399e32 (diff) | |
download | powerdebug-1a32ec046dbb85823eeb2fb965a594614473d719.tar.gz |
Fix the numbering of display options.
The ordering of the display options was not matching with
the order of the windows defined in display.h causing GPIO and
CLOCK display to seg fault/not work. This patch fixes this issue.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
-rw-r--r-- | display.c | 2 | ||||
-rw-r--r-- | powerdebug.h | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -557,7 +557,7 @@ int display_init(struct powerdebug_options *options) int i, maxx, maxy; size_t array_size = sizeof(windata) / sizeof(windata[0]); - current_win = 1 << (ffs(options->flags & DEFAULT_OPTION) - 1); + current_win = (ffs(options->flags & DEFAULT_OPTION) - 1); signal(SIGWINCH, sigwinch_handler); diff --git a/powerdebug.h b/powerdebug.h index 7cf8220..a8073a6 100644 --- a/powerdebug.h +++ b/powerdebug.h @@ -21,9 +21,9 @@ #define VERSION "0.7.3" -#define REGULATOR_OPTION 0x01 -#define SENSOR_OPTION 0x02 -#define CLOCK_OPTION 0x04 +#define CLOCK_OPTION 0x01 +#define REGULATOR_OPTION 0x02 +#define SENSOR_OPTION 0x04 #define GPIO_OPTION 0x08 #define VERBOSE_OPTION 0x1000 |