|
|
@@ -134,7 +134,7 @@ bool use_syslog;
|
|
|
bool opt_quiet_work_updates;
|
|
|
bool opt_quiet;
|
|
|
bool opt_realquiet;
|
|
|
-bool opt_loginput;
|
|
|
+int loginput_size;
|
|
|
bool opt_compact;
|
|
|
bool opt_show_procs;
|
|
|
const int opt_cutofftemp = 95;
|
|
|
@@ -3819,6 +3819,13 @@ static void print_status(int thr_id)
|
|
|
static
|
|
|
bool set_statusy(int maxy)
|
|
|
{
|
|
|
+ if (loginput_size)
|
|
|
+ {
|
|
|
+ maxy -= loginput_size;
|
|
|
+ if (maxy < 0)
|
|
|
+ maxy = 0;
|
|
|
+ }
|
|
|
+
|
|
|
if (logstart < maxy)
|
|
|
maxy = logstart;
|
|
|
|
|
|
@@ -3936,7 +3943,7 @@ bool _log_curses_only(int prio, const char *datetime, const char *str)
|
|
|
|
|
|
if (curses_active)
|
|
|
{
|
|
|
- if (!opt_loginput || high_prio) {
|
|
|
+ if (!loginput_size || high_prio) {
|
|
|
wlog(" %s %s\n", datetime, str);
|
|
|
if (high_prio) {
|
|
|
touchwin(logwin);
|
|
|
@@ -6773,15 +6780,22 @@ void zero_stats(void)
|
|
|
}
|
|
|
|
|
|
#ifdef HAVE_CURSES
|
|
|
+static
|
|
|
+void loginput_mode(const int size)
|
|
|
+{
|
|
|
+ clear_logwin();
|
|
|
+ loginput_size = size;
|
|
|
+ check_winsizes();
|
|
|
+}
|
|
|
+
|
|
|
static void display_pools(void)
|
|
|
{
|
|
|
struct pool *pool;
|
|
|
int selected, i, j;
|
|
|
char input;
|
|
|
|
|
|
- opt_loginput = true;
|
|
|
+ loginput_mode(7 + total_pools);
|
|
|
immedok(logwin, true);
|
|
|
- clear_logwin();
|
|
|
updated:
|
|
|
for (j = 0; j < total_pools; j++) {
|
|
|
for (i = 0; i < total_pools; i++) {
|
|
|
@@ -6978,11 +6992,10 @@ retry:
|
|
|
default:
|
|
|
goto updated;
|
|
|
}
|
|
|
- } else
|
|
|
- clear_logwin();
|
|
|
+ }
|
|
|
|
|
|
immedok(logwin, false);
|
|
|
- opt_loginput = false;
|
|
|
+ loginput_mode(0);
|
|
|
}
|
|
|
|
|
|
static const char *summary_detail_level_str(void)
|
|
|
@@ -6999,8 +7012,8 @@ static void display_options(void)
|
|
|
int selected;
|
|
|
char input;
|
|
|
|
|
|
- opt_loginput = true;
|
|
|
immedok(logwin, true);
|
|
|
+ loginput_mode(12);
|
|
|
retry:
|
|
|
clear_logwin();
|
|
|
wlogprint("[N]ormal [C]lear [S]ilent mode (disable all output)\n");
|
|
|
@@ -7099,11 +7112,10 @@ retry:
|
|
|
} else if (!strncasecmp(&input, "z", 1)) {
|
|
|
zero_stats();
|
|
|
goto retry;
|
|
|
- } else
|
|
|
- clear_logwin();
|
|
|
+ }
|
|
|
|
|
|
immedok(logwin, false);
|
|
|
- opt_loginput = false;
|
|
|
+ loginput_mode(0);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
@@ -7130,9 +7142,8 @@ static void set_options(void)
|
|
|
int selected;
|
|
|
char input;
|
|
|
|
|
|
- opt_loginput = true;
|
|
|
immedok(logwin, true);
|
|
|
- clear_logwin();
|
|
|
+ loginput_mode(8);
|
|
|
retry:
|
|
|
wlogprint("\n[L]ongpoll: %s\n", want_longpoll ? "On" : "Off");
|
|
|
wlogprint("[Q]ueue: %d\n[S]cantime: %d\n[E]xpiry: %d\n[R]etries: %d\n"
|
|
|
@@ -7219,8 +7230,8 @@ retry:
|
|
|
} else
|
|
|
clear_logwin();
|
|
|
|
|
|
+ loginput_mode(0);
|
|
|
immedok(logwin, false);
|
|
|
- opt_loginput = false;
|
|
|
}
|
|
|
|
|
|
int scan_serial(const char *);
|
|
|
@@ -7246,9 +7257,9 @@ void manage_device(void)
|
|
|
struct cgpu_info *cgpu;
|
|
|
const struct device_drv *drv;
|
|
|
|
|
|
- opt_loginput = true;
|
|
|
selecting_device = true;
|
|
|
immedok(logwin, true);
|
|
|
+ loginput_mode(12);
|
|
|
|
|
|
devchange:
|
|
|
if (unlikely(!total_devices))
|
|
|
@@ -7442,15 +7453,13 @@ key_default:
|
|
|
|
|
|
out:
|
|
|
selecting_device = false;
|
|
|
- clear_logwin();
|
|
|
+ loginput_mode(0);
|
|
|
immedok(logwin, false);
|
|
|
- opt_loginput = false;
|
|
|
}
|
|
|
|
|
|
void show_help(void)
|
|
|
{
|
|
|
- opt_loginput = true;
|
|
|
- clear_logwin();
|
|
|
+ loginput_mode(10);
|
|
|
|
|
|
// NOTE: wlogprint is a macro with a buffer limit
|
|
|
_wlogprint(
|
|
|
@@ -7483,8 +7492,7 @@ void show_help(void)
|
|
|
logwin_update();
|
|
|
getch();
|
|
|
|
|
|
- clear_logwin();
|
|
|
- opt_loginput = false;
|
|
|
+ loginput_mode(0);
|
|
|
}
|
|
|
|
|
|
static void *input_thread(void __maybe_unused *userdata)
|