From 43366ca2599f12b5b61eaae74b685ae5c87676dc Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Tue, 27 Feb 2018 16:50:08 +0100 Subject: [PATCH] console: lxc_terminal_create_log_file() Signed-off-by: Christian Brauner --- src/lxc/commands.c | 3 +-- src/lxc/console.c | 4 ++-- src/lxc/console.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lxc/commands.c b/src/lxc/commands.c index e7fe012a5..9e6be55db 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -991,8 +991,7 @@ static int lxc_cmd_console_log_callback(int fd, struct lxc_cmd_req *req, rsp.ret = 0; if (log->clear) - /* clear the ringbuffer */ - lxc_ringbuf_clear(buf); + lxc_ringbuf_clear(buf); /* clear the ringbuffer */ else if (rsp.datalen > 0) lxc_ringbuf_move_read_addr(buf, rsp.datalen); diff --git a/src/lxc/console.c b/src/lxc/console.c index d1f5b234c..d2a3698d1 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -822,7 +822,7 @@ static int lxc_terminal_create_ringbuf(struct lxc_pty *console) * This is the console log file. Please note that the console log file is * (implementation wise not content wise) independent of the console ringbuffer. */ -int lxc_console_create_log_file(struct lxc_pty *console) +int lxc_terminal_create_log_file(struct lxc_pty *console) { if (!console->log_path) return 0; @@ -889,7 +889,7 @@ int lxc_console_create(struct lxc_conf *conf) return -1; /* create console log file */ - ret = lxc_console_create_log_file(console); + ret = lxc_terminal_create_log_file(console); if (ret < 0) goto err; diff --git a/src/lxc/console.h b/src/lxc/console.h index d8e8d532c..617a9b178 100644 --- a/src/lxc/console.h +++ b/src/lxc/console.h @@ -228,7 +228,7 @@ extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata, extern void lxc_terminal_signal_fini(struct lxc_tty_state *ts); extern int lxc_terminal_write_ringbuffer(struct lxc_pty *console); -extern int lxc_console_create_log_file(struct lxc_pty *console); +extern int lxc_terminal_create_log_file(struct lxc_pty *console); extern int lxc_terminal_io_cb(int fd, uint32_t events, void *data, struct lxc_epoll_descr *descr);