From: Christian Brauner Date: Tue, 27 Feb 2018 15:28:15 +0000 (+0100) Subject: console: lxc_terminal_signal_init() X-Git-Tag: lxc-3.0.0.beta1~5^2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc8c7883501c663184063de1c6ed85e7861c6c18;p=thirdparty%2Flxc.git console: lxc_terminal_signal_init() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/console.c b/src/lxc/console.c index 8020f8c30..c2c7f81e5 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -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; diff --git a/src/lxc/console.h b/src/lxc/console.h index 5bd90cf76..0d77f5006 100644 --- a/src/lxc/console.h +++ b/src/lxc/console.h @@ -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.