mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-08 13:24:23 +00:00
console: lxc_terminal_stdin_cb()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
ae6d39133f
commit
52f9292f7e
@ -931,7 +931,7 @@ int lxc_terminal_set_stdfds(int fd)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int lxc_console_cb_tty_stdin(int fd, uint32_t events, void *cbdata,
|
int lxc_terminal_stdin_cb(int fd, uint32_t events, void *cbdata,
|
||||||
struct lxc_epoll_descr *descr)
|
struct lxc_epoll_descr *descr)
|
||||||
{
|
{
|
||||||
struct lxc_tty_state *ts = cbdata;
|
struct lxc_tty_state *ts = cbdata;
|
||||||
@ -1044,7 +1044,7 @@ int lxc_console(struct lxc_container *c, int ttynum,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = lxc_mainloop_add_handler(&descr, ts->stdinfd,
|
ret = lxc_mainloop_add_handler(&descr, ts->stdinfd,
|
||||||
lxc_console_cb_tty_stdin, ts);
|
lxc_terminal_stdin_cb, ts);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
ERROR("Failed to add stdin handler");
|
ERROR("Failed to add stdin handler");
|
||||||
goto close_mainloop;
|
goto close_mainloop;
|
||||||
|
@ -40,11 +40,11 @@ struct lxc_tty_state
|
|||||||
int masterfd;
|
int masterfd;
|
||||||
/* Escape sequence to use for exiting the pty. A single char can be
|
/* Escape sequence to use for exiting the pty. A single char can be
|
||||||
* specified. The pty can then exited by doing: Ctrl + specified_char + q.
|
* specified. The pty can then exited by doing: Ctrl + specified_char + q.
|
||||||
* This field is checked by lxc_console_cb_tty_stdin(). Set to -1 to
|
* This field is checked by lxc_terminal_stdin_cb(). Set to -1 to
|
||||||
* disable exiting the pty via a escape sequence.
|
* disable exiting the pty via a escape sequence.
|
||||||
*/
|
*/
|
||||||
int escape;
|
int escape;
|
||||||
/* Used internally by lxc_console_cb_tty_stdin() to check whether an
|
/* Used internally by lxc_terminal_stdin_cb() to check whether an
|
||||||
* escape sequence has been received.
|
* escape sequence has been received.
|
||||||
*/
|
*/
|
||||||
int saw_escape;
|
int saw_escape;
|
||||||
@ -156,7 +156,7 @@ extern int lxc_terminal_set_stdfds(int fd);
|
|||||||
* lxc_terminal_mainloop_add().
|
* lxc_terminal_mainloop_add().
|
||||||
* This function exits the loop cleanly when an EPOLLHUP event is received.
|
* This function exits the loop cleanly when an EPOLLHUP event is received.
|
||||||
*/
|
*/
|
||||||
extern int lxc_console_cb_tty_stdin(int fd, uint32_t events, void *cbdata,
|
extern int lxc_terminal_stdin_cb(int fd, uint32_t events, void *cbdata,
|
||||||
struct lxc_epoll_descr *descr);
|
struct lxc_epoll_descr *descr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user