int console_batch_mode = FALSE;
+static void *console_logctx = NULL;
+
/*
* Clean up and exit.
*/
fputs(message, stderr);
}
+void console_provide_logctx(void *logctx)
+{
+ console_logctx = logctx;
+}
+
void logevent(void *frontend, const char *string)
{
- log_eventlog(logctx, string);
+ if (console_logctx)
+ log_eventlog(console_logctx, string);
}
int console_get_line(const char *prompt, char *str,
*/
return;
}
+
+int is_interactive(void)
+{
+ return isatty(0);
+}