]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
console: lxc_terminal_create_log_file()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 27 Feb 2018 15:50:08 +0000 (16:50 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 27 Feb 2018 21:25:04 +0000 (22:25 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/commands.c
src/lxc/console.c
src/lxc/console.h

index e7fe012a569ed4de20631e8dcf1920c45c1ea628..9e6be55dbe42d903529e4446696a82e2d4456d98 100644 (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);
 
index d1f5b234ca562d3b0e3c8aa0a4c4162e6b76e1a1..d2a3698d1bdc0c11f6f6c470565988f4e754510c 100644 (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;
 
index d8e8d532c5b92d4579103f70fa2bbfe4dc84618b..617a9b178d5c1b521be77891a301c59c9652951d 100644 (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);