]> git.proxmox.com Git - mirror_lxc.git/commitdiff
console: lxc_terminal_signal_init()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 27 Feb 2018 15:28:15 +0000 (16:28 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 27 Feb 2018 21:15:21 +0000 (22:15 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/console.c
src/lxc/console.h

index 8020f8c30a5cf61a6a652cbd10b11c8b1c92da99..c2c7f81e58e8696b0d7773895f80df801e0e14c0 100644 (file)
@@ -131,7 +131,7 @@ int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
        return 0;
 }
 
-struct lxc_tty_state *lxc_console_signal_init(int srcfd, int dstfd)
+struct lxc_tty_state *lxc_terminal_signal_init(int srcfd, int dstfd)
 {
        int ret;
        bool istty;
@@ -556,7 +556,7 @@ static int lxc_console_peer_proxy_alloc(struct lxc_pty *console, int sockfd)
        if (lxc_setup_tios(console->peerpty.slave, &oldtermio) < 0)
                goto err1;
 
-       ts = lxc_console_signal_init(console->peerpty.master, console->master);
+       ts = lxc_terminal_signal_init(console->peerpty.master, console->master);
        if (!ts)
                goto err1;
 
@@ -670,7 +670,7 @@ static int lxc_console_peer_default(struct lxc_pty *console)
                goto on_error1;
        }
 
-       ts = lxc_console_signal_init(console->peer, console->master);
+       ts = lxc_terminal_signal_init(console->peer, console->master);
        console->tty_state = ts;
        if (!ts) {
                WARN("Failed to install signal handler");
@@ -1010,7 +1010,7 @@ int lxc_console(struct lxc_container *c, int ttynum,
        if (ret < 0)
                TRACE("Process is already group leader");
 
-       ts = lxc_console_signal_init(stdinfd, masterfd);
+       ts = lxc_terminal_signal_init(stdinfd, masterfd);
        if (!ts) {
                ret = -1;
                goto close_fds;
index 5bd90cf76505c0ec35ca42a93810a39097b94bff..0d77f5006d7365b9cb07f9cebb5fcd0a176019c4 100644 (file)
@@ -184,7 +184,7 @@ extern int lxc_setup_tios(int fd, struct termios *oldtios);
 extern void lxc_terminal_winsz(int srcfd, int dstfd);
 
 /*
- * lxc_console_signal_init: install signal handler
+ * lxc_terminal_signal_init: install signal handler
  *
  * @srcfd  : src for winsz in SIGWINCH handler
  * @dstfd  : dst for winsz in SIGWINCH handler
@@ -205,7 +205,7 @@ extern void lxc_terminal_winsz(int srcfd, int dstfd);
  *
  * This function allocates memory. It is up to the caller to free it.
  */
-extern struct lxc_tty_state *lxc_console_signal_init(int srcfd, int dstfd);
+extern struct lxc_tty_state *lxc_terminal_signal_init(int srcfd, int dstfd);
 
 /*
  * Handler for signal events. To be registered via the corresponding functions
@@ -217,10 +217,10 @@ extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
 /*
  * lxc_console_signal_fini: uninstall signal handler
  *
- * @ts  : the lxc_tty_state returned by lxc_console_signal_init
+ * @ts  : the lxc_tty_state returned by lxc_terminal_signal_init
  *
  * Restore the saved signal handler that was in effect at the time
- * lxc_console_signal_init() was called.
+ * lxc_terminal_signal_init() was called.
  *
  * Must be called with process_lock held to protect the lxc_ttys list, or
  * from a non-threaded context.