This patch introduces a console_open_log console_cleanup function. This function
opens the console log file.
Signed-off-by: Bhupinder Thakur <bhupinder.thakur@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Wei Liu <wei.liu2@citrix.com>
(void)xenevtchn_unmask(xce_handle, port);
}
+static void console_open_log(struct console *con)
+{
+ if (console_enabled(con)) {
+ if (con->log_fd != -1)
+ close(con->log_fd);
+ con->log_fd = create_console_log(con);
+ }
+}
+
static void handle_log_reload(void)
{
if (log_guest) {
for (d = dom_head; d; d = d->next) {
struct console *con = &d->console;
- if (con->log_fd != -1)
- close(con->log_fd);
- con->log_fd = create_console_log(con);
+ console_open_log(con);
}
}