console: lxc_terminal_free()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-02-27 16:42:30 +01:00
parent c1ee47cd79
commit 3dfe6f8dac
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D
3 changed files with 5 additions and 5 deletions

View File

@ -757,7 +757,7 @@ static int lxc_cmd_console_callback(int fd, struct lxc_cmd_req *req,
ret = lxc_abstract_unix_send_fds(fd, &masterfd, 1, &rsp, sizeof(rsp)); ret = lxc_abstract_unix_send_fds(fd, &masterfd, 1, &rsp, sizeof(rsp));
if (ret < 0) { if (ret < 0) {
ERROR("Failed to send tty to client"); ERROR("Failed to send tty to client");
lxc_console_free(handler->conf, fd); lxc_terminal_free(handler->conf, fd);
goto out_close; goto out_close;
} }
@ -1080,7 +1080,7 @@ static void lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler,
struct lxc_state_client *client; struct lxc_state_client *client;
struct lxc_list *cur, *next; struct lxc_list *cur, *next;
lxc_console_free(handler->conf, fd); lxc_terminal_free(handler->conf, fd);
lxc_mainloop_del_handler(descr, fd); lxc_mainloop_del_handler(descr, fd);
if (cmd != LXC_CMD_ADD_STATE_CLIENT) { if (cmd != LXC_CMD_ADD_STATE_CLIENT) {
close(fd); close(fd);

View File

@ -617,7 +617,7 @@ out:
return masterfd; return masterfd;
} }
void lxc_console_free(struct lxc_conf *conf, int fd) void lxc_terminal_free(struct lxc_conf *conf, int fd)
{ {
int i; int i;
struct lxc_tty_info *tty_info = &conf->tty_info; struct lxc_tty_info *tty_info = &conf->tty_info;

View File

@ -101,7 +101,7 @@ extern int lxc_console_create(struct lxc_conf *);
extern void lxc_console_delete(struct lxc_pty *); extern void lxc_console_delete(struct lxc_pty *);
/* /*
* lxc_console_free: mark the console or a tty as unallocated, free any * lxc_terminal_free: mark the console or a tty as unallocated, free any
* resources allocated by lxc_terminal_allocate(). * resources allocated by lxc_terminal_allocate().
* *
* @conf : the configuration of the container whose tty was closed * @conf : the configuration of the container whose tty was closed
@ -109,7 +109,7 @@ extern void lxc_console_delete(struct lxc_pty *);
* the console or tty is no longer in use. this is used to match * the console or tty is no longer in use. this is used to match
* which console/tty is being freed. * which console/tty is being freed.
*/ */
extern void lxc_console_free(struct lxc_conf *conf, int fd); extern void lxc_terminal_free(struct lxc_conf *conf, int fd);
/* /*
* Register pty event handlers in an open mainloop * Register pty event handlers in an open mainloop