summaryrefslogtreecommitdiff
path: root/scripts/config/lxdialog/yesno.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-01-08 14:33:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-01-08 14:33:53 +0000
commita9f6941436e83d2f91caf06c13bee86cad309064 (patch)
tree8f3b14ce3f98718cc2513344b82ceb703638ba9b /scripts/config/lxdialog/yesno.c
parent3f26960a5c8db5b7cbdf120ddcd7feaadca51c8f (diff)
downloadmtk-20170518-a9f6941436e83d2f91caf06c13bee86cad309064.zip
mtk-20170518-a9f6941436e83d2f91caf06c13bee86cad309064.tar.gz
mtk-20170518-a9f6941436e83d2f91caf06c13bee86cad309064.tar.bz2
scripts/config: sync with linux upstream
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43873
Diffstat (limited to 'scripts/config/lxdialog/yesno.c')
-rw-r--r--scripts/config/lxdialog/yesno.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/config/lxdialog/yesno.c b/scripts/config/lxdialog/yesno.c
index 4e6e809..676fb2f 100644
--- a/scripts/config/lxdialog/yesno.c
+++ b/scripts/config/lxdialog/yesno.c
@@ -45,14 +45,14 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width)
WINDOW *dialog;
do_resize:
- if (getmaxy(stdscr) < (height + 4))
+ if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN))
return -ERRDISPLAYTOOSMALL;
- if (getmaxx(stdscr) < (width + 4))
+ if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN))
return -ERRDISPLAYTOOSMALL;
/* center dialog box on screen */
- x = (COLS - width) / 2;
- y = (LINES - height) / 2;
+ x = (getmaxx(stdscr) - width) / 2;
+ y = (getmaxy(stdscr) - height) / 2;
draw_shadow(stdscr, y, x, height, width);