X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=tools%2Fthermal%2Ftmon%2Ftui.c;fp=tools%2Fthermal%2Ftmon%2Ftui.c;h=2779573a53cb55fec757389f152950abfe9c7299;hp=43c5aecf71daf51a833947726e290c9044de84e4;hb=0e7b766dc0aeedd47c8264242e06f3a470f5d589;hpb=a90b6b006c616f1a33f8ffb6939e31c8d66926a4 diff --git a/tools/thermal/tmon/tui.c b/tools/thermal/tmon/tui.c index 43c5aecf71da..2779573a53cb 100644 --- a/tools/thermal/tmon/tui.c +++ b/tools/thermal/tmon/tui.c @@ -274,11 +274,14 @@ const char DIAG_TITLE[] = "[ TUNABLES ]"; void show_dialogue(void) { int j, x = 0, y = 0; + int rows, cols; WINDOW *w = dialogue_window; if (tui_disabled || !w) return; + getmaxyx(w, rows, cols); + werase(w); box(w, 0, 0); mvwprintw(w, 0, maxx/4, DIAG_TITLE); @@ -297,10 +300,8 @@ void show_dialogue(void) wattron(w, A_BOLD); mvwprintw(w, DIAG_DEV_ROWS+1, 1, "Enter Choice [A-Z]?"); wattroff(w, A_BOLD); - /* y size of dialogue win is nr cdev + 5, so print legend - * at the bottom line - */ - mvwprintw(w, ptdata.nr_cooling_dev+3, 1, + /* print legend at the bottom line */ + mvwprintw(w, rows - 2, 1, "Legend: A=Active, P=Passive, C=Critical"); wrefresh(dialogue_window);