From: Christian Brauner Date: Tue, 27 Feb 2018 16:11:44 +0000 (+0100) Subject: console: lxc_terminal_init() X-Git-Tag: lxc-3.0.0.beta1~5^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc26f08602d2b7f340dee591e4b3da59305012ab;p=thirdparty%2Flxc.git console: lxc_terminal_init() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/attach.c b/src/lxc/attach.c index ad059e8c3..d5f7006b1 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -978,7 +978,7 @@ static int lxc_attach_pty(struct lxc_conf *conf, struct lxc_pty *pty) { int ret; - lxc_pty_init(pty); + lxc_terminal_init(pty); ret = lxc_terminal_create(pty); if (ret < 0) { @@ -1198,7 +1198,7 @@ int lxc_attach(const char *name, const char *lxcpath, pty.log_fd = options->log_fd; } else { - lxc_pty_init(&pty); + lxc_terminal_init(&pty); } /* Create a socket pair for IPC communication; set SOCK_CLOEXEC in order diff --git a/src/lxc/console.c b/src/lxc/console.c index 5cf53cc9c..ac16d1e26 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -59,7 +59,7 @@ static struct lxc_list lxc_ttys; typedef void (*sighandler_t)(int); -__attribute__((constructor)) void lxc_terminal_init(void) +__attribute__((constructor)) void lxc_terminal_init_global(void) { lxc_list_init(&lxc_ttys); } @@ -1136,7 +1136,7 @@ void lxc_terminal_info_init(struct lxc_pty_info *pty) pty->busy = -1; } -void lxc_pty_init(struct lxc_pty *pty) +void lxc_terminal_init(struct lxc_pty *pty) { memset(pty, 0, sizeof(*pty)); pty->slave = -EBADF; diff --git a/src/lxc/console.h b/src/lxc/console.h index 15fa4c271..a81e67db5 100644 --- a/src/lxc/console.h +++ b/src/lxc/console.h @@ -236,7 +236,7 @@ extern int lxc_make_controlling_pty(int fd); extern int lxc_login_pty(int fd); extern void lxc_pty_conf_free(struct lxc_pty *console); extern void lxc_terminal_info_init(struct lxc_pty_info *pty); -extern void lxc_pty_init(struct lxc_pty *pty); +extern void lxc_terminal_init(struct lxc_pty *pty); extern int lxc_pty_map_ids(struct lxc_conf *c, struct lxc_pty *pty); #endif