console: lxc_terminal_mainloop_add()

parent 22b183ea
...@@ -1012,7 +1012,7 @@ static int lxc_attach_pty_mainloop_init(struct lxc_pty *pty, ...@@ -1012,7 +1012,7 @@ static int lxc_attach_pty_mainloop_init(struct lxc_pty *pty,
return -1; return -1;
} }
ret = lxc_console_mainloop_add(descr, pty); ret = lxc_terminal_mainloop_add(descr, pty);
if (ret < 0) { if (ret < 0) {
ERROR("Failed to add handlers to mainloop"); ERROR("Failed to add handlers to mainloop");
lxc_mainloop_close(descr); lxc_mainloop_close(descr);
......
...@@ -433,7 +433,7 @@ static int lxc_terminal_mainloop_add_peer(struct lxc_pty *console) ...@@ -433,7 +433,7 @@ static int lxc_terminal_mainloop_add_peer(struct lxc_pty *console)
return 0; return 0;
} }
int lxc_console_mainloop_add(struct lxc_epoll_descr *descr, int lxc_terminal_mainloop_add(struct lxc_epoll_descr *descr,
struct lxc_pty *console) struct lxc_pty *console)
{ {
int ret; int ret;
......
...@@ -114,7 +114,7 @@ extern void lxc_console_free(struct lxc_conf *conf, int fd); ...@@ -114,7 +114,7 @@ extern void lxc_console_free(struct lxc_conf *conf, int fd);
/* /*
* Register pty event handlers in an open mainloop * Register pty event handlers in an open mainloop
*/ */
extern int lxc_console_mainloop_add(struct lxc_epoll_descr *, struct lxc_pty *); extern int lxc_terminal_mainloop_add(struct lxc_epoll_descr *, struct lxc_pty *);
/* /*
* Handle SIGWINCH events on the allocated ptys. * Handle SIGWINCH events on the allocated ptys.
...@@ -153,7 +153,7 @@ extern int lxc_console_set_stdfds(int fd); ...@@ -153,7 +153,7 @@ extern int lxc_console_set_stdfds(int fd);
/* /*
* Handler for events on the stdin fd of the pty. To be registered via the * Handler for events on the stdin fd of the pty. To be registered via the
* corresponding functions declared and defined in mainloop.{c,h} or * corresponding functions declared and defined in mainloop.{c,h} or
* lxc_console_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_console_cb_tty_stdin(int fd, uint32_t events, void *cbdata,
...@@ -162,7 +162,7 @@ extern int lxc_console_cb_tty_stdin(int fd, uint32_t events, void *cbdata, ...@@ -162,7 +162,7 @@ extern int lxc_console_cb_tty_stdin(int fd, uint32_t events, void *cbdata,
/* /*
* Handler for events on the master fd of the pty. To be registered via the * Handler for events on the master fd of the pty. To be registered via the
* corresponding functions declared and defined in mainloop.{c,h} or * corresponding functions declared and defined in mainloop.{c,h} or
* lxc_console_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_master(int fd, uint32_t events, void *cbdata, extern int lxc_console_cb_tty_master(int fd, uint32_t events, void *cbdata,
...@@ -209,7 +209,7 @@ extern struct lxc_tty_state *lxc_terminal_signal_init(int srcfd, int dstfd); ...@@ -209,7 +209,7 @@ extern struct lxc_tty_state *lxc_terminal_signal_init(int srcfd, int dstfd);
/* /*
* Handler for signal events. To be registered via the corresponding functions * Handler for signal events. To be registered via the corresponding functions
* declared and defined in mainloop.{c,h} or lxc_console_mainloop_add(). * declared and defined in mainloop.{c,h} or lxc_terminal_mainloop_add().
*/ */
extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata, extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
struct lxc_epoll_descr *descr); struct lxc_epoll_descr *descr);
......
...@@ -531,13 +531,13 @@ int lxc_poll(const char *name, struct lxc_handler *handler) ...@@ -531,13 +531,13 @@ int lxc_poll(const char *name, struct lxc_handler *handler)
if (has_console) { if (has_console) {
struct lxc_pty *console = &handler->conf->console; struct lxc_pty *console = &handler->conf->console;
ret = lxc_console_mainloop_add(&descr, console); ret = lxc_terminal_mainloop_add(&descr, console);
if (ret < 0) { if (ret < 0) {
ERROR("Failed to add console handlers to mainloop"); ERROR("Failed to add console handlers to mainloop");
goto out_mainloop_console; goto out_mainloop_console;
} }
ret = lxc_console_mainloop_add(&descr_console, console); ret = lxc_terminal_mainloop_add(&descr_console, console);
if (ret < 0) { if (ret < 0) {
ERROR("Failed to add console handlers to console mainloop"); ERROR("Failed to add console handlers to console mainloop");
goto out_mainloop_console; goto out_mainloop_console;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment