From: Christian Brauner Date: Tue, 27 Feb 2018 15:50:08 +0000 (+0100) Subject: console: lxc_terminal_create_log_file() X-Git-Tag: lxc-3.0.0.beta1~5^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43366ca2599f12b5b61eaae74b685ae5c87676dc;p=thirdparty%2Flxc.git console: lxc_terminal_create_log_file() Signed-off-by: Christian Brauner --- 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);