console: lxc_terminal_create_log_file()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-02-27 16:50:08 +01:00
parent 9bc780839b
commit 43366ca259
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D
3 changed files with 4 additions and 5 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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);