mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 09:47:06 +00:00
console: lxc_terminal_allocate()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
93ed49903f
commit
c1ee47cd79
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user