From: Christian Brauner Date: Tue, 27 Feb 2018 15:38:12 +0000 (+0100) Subject: console: lxc_terminal_allocate() X-Git-Tag: lxc-3.0.0.beta1~5^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1ee47cd79506a5ee33543a219d45b8598c2dc7d;p=thirdparty%2Flxc.git console: lxc_terminal_allocate() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/commands.c b/src/lxc/commands.c index 7f4d50b0e..86fcf3a4f 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -748,7 +748,7 @@ static int lxc_cmd_console_callback(int fd, struct lxc_cmd_req *req, struct lxc_cmd_rsp rsp; int ttynum = PTR_TO_INT(req->data); - masterfd = lxc_console_allocate(handler->conf, fd, &ttynum); + masterfd = lxc_terminal_allocate(handler->conf, fd, &ttynum); if (masterfd < 0) goto out_close; diff --git a/src/lxc/console.c b/src/lxc/console.c index f9ec6049f..60d471dc8 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -451,7 +451,7 @@ int lxc_terminal_mainloop_add(struct lxc_epoll_descr *descr, } /* We cache the descr so that we can add an fd to it when someone - * does attach to it in lxc_console_allocate(). + * does attach to it in lxc_terminal_allocate(). */ console->descr = descr; ret = lxc_terminal_mainloop_add_peer(console); @@ -575,7 +575,7 @@ err1: return -1; } -int lxc_console_allocate(struct lxc_conf *conf, int sockfd, int *ttyreq) +int lxc_terminal_allocate(struct lxc_conf *conf, int sockfd, int *ttyreq) { int masterfd = -1, ttynum; struct lxc_tty_info *tty_info = &conf->tty_info; diff --git a/src/lxc/console.h b/src/lxc/console.h index b7f05f5a4..a64e7c254 100644 --- a/src/lxc/console.h +++ b/src/lxc/console.h @@ -61,14 +61,14 @@ struct lxc_tty_state }; /* - * lxc_console_allocate: allocate the console or a tty + * lxc_terminal_allocate: allocate the console or a tty * * @conf : the configuration of the container to allocate from * @sockfd : the socket fd whose remote side when closed, will be an * indication that the console or tty is no longer in use * @ttyreq : the tty requested to be opened, -1 for any, 0 for the console */ -extern int lxc_console_allocate(struct lxc_conf *conf, int sockfd, int *ttynum); +extern int lxc_terminal_allocate(struct lxc_conf *conf, int sockfd, int *ttynum); /* * Create a new pty: @@ -102,7 +102,7 @@ extern void lxc_console_delete(struct lxc_pty *); /* * lxc_console_free: mark the console or a tty as unallocated, free any - * resources allocated by lxc_console_allocate(). + * resources allocated by lxc_terminal_allocate(). * * @conf : the configuration of the container whose tty was closed * @fd : the socket fd whose remote side was closed, which indicated