console: lxc_terminal_winsz()

parent 9785b539
...@@ -64,7 +64,7 @@ __attribute__((constructor)) void lxc_console_init(void) ...@@ -64,7 +64,7 @@ __attribute__((constructor)) void lxc_console_init(void)
lxc_list_init(&lxc_ttys); lxc_list_init(&lxc_ttys);
} }
void lxc_console_winsz(int srcfd, int dstfd) void lxc_terminal_winsz(int srcfd, int dstfd)
{ {
int ret; int ret;
struct winsize wsz; struct winsize wsz;
...@@ -90,7 +90,7 @@ void lxc_console_winsz(int srcfd, int dstfd) ...@@ -90,7 +90,7 @@ void lxc_console_winsz(int srcfd, int dstfd)
static void lxc_console_winch(struct lxc_tty_state *ts) static void lxc_console_winch(struct lxc_tty_state *ts)
{ {
lxc_console_winsz(ts->stdinfd, ts->masterfd); lxc_terminal_winsz(ts->stdinfd, ts->masterfd);
if (ts->winch_proxy) if (ts->winch_proxy)
lxc_cmd_console_winch(ts->winch_proxy, ts->winch_proxy_lxcpath); lxc_cmd_console_winch(ts->winch_proxy, ts->winch_proxy_lxcpath);
...@@ -677,7 +677,7 @@ static int lxc_console_peer_default(struct lxc_pty *console) ...@@ -677,7 +677,7 @@ static int lxc_console_peer_default(struct lxc_pty *console)
goto on_error1; goto on_error1;
} }
lxc_console_winsz(console->peer, console->master); lxc_terminal_winsz(console->peer, console->master);
console->tios = malloc(sizeof(*console->tios)); console->tios = malloc(sizeof(*console->tios));
if (!console->tios) { if (!console->tios) {
...@@ -1022,7 +1022,7 @@ int lxc_console(struct lxc_container *c, int ttynum, ...@@ -1022,7 +1022,7 @@ int lxc_console(struct lxc_container *c, int ttynum,
istty = isatty(stdinfd); istty = isatty(stdinfd);
if (istty) { if (istty) {
lxc_console_winsz(stdinfd, masterfd); lxc_terminal_winsz(stdinfd, masterfd);
lxc_cmd_console_winch(ts->winch_proxy, ts->winch_proxy_lxcpath); lxc_cmd_console_winch(ts->winch_proxy, ts->winch_proxy_lxcpath);
} else { } else {
INFO("File descriptor %d does not refer to a tty device", stdinfd); INFO("File descriptor %d does not refer to a tty device", stdinfd);
......
...@@ -176,12 +176,12 @@ extern int lxc_setup_tios(int fd, struct termios *oldtios); ...@@ -176,12 +176,12 @@ extern int lxc_setup_tios(int fd, struct termios *oldtios);
/* /*
* lxc_console_winsz: propagte winsz from one terminal to another * lxc_terminal_winsz: propagate winsz from one terminal to another
* *
* @srcfd : terminal to get size from (typically a slave pty) * @srcfd : terminal to get size from (typically a slave pty)
* @dstfd : terminal to set size on (typically a master pty) * @dstfd : terminal to set size on (typically a master pty)
*/ */
extern void lxc_console_winsz(int srcfd, int dstfd); extern void lxc_terminal_winsz(int srcfd, int dstfd);
/* /*
* lxc_console_signal_init: install signal handler * lxc_console_signal_init: install signal handler
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment