From: Christian Brauner Date: Tue, 27 Feb 2018 15:34:55 +0000 (+0100) Subject: console: lxc_terminal_mainloop_add() X-Git-Tag: lxc-3.0.0.beta1~5^2~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=093bce5f6635525b9f5d96b37c242b276d7b24da;p=thirdparty%2Flxc.git console: lxc_terminal_mainloop_add() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 58e17fb6a..f4e1e9906 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -1012,7 +1012,7 @@ static int lxc_attach_pty_mainloop_init(struct lxc_pty *pty, return -1; } - ret = lxc_console_mainloop_add(descr, pty); + ret = lxc_terminal_mainloop_add(descr, pty); if (ret < 0) { ERROR("Failed to add handlers to mainloop"); lxc_mainloop_close(descr); diff --git a/src/lxc/console.c b/src/lxc/console.c index e38e2d7b3..884be2ff7 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -433,7 +433,7 @@ static int lxc_terminal_mainloop_add_peer(struct lxc_pty *console) 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) { int ret; diff --git a/src/lxc/console.h b/src/lxc/console.h index 91a4ae43b..b7f05f5a4 100644 --- a/src/lxc/console.h +++ b/src/lxc/console.h @@ -114,7 +114,7 @@ extern void lxc_console_free(struct lxc_conf *conf, int fd); /* * 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. @@ -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 * 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. */ 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 * 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. */ 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); /* * 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, struct lxc_epoll_descr *descr); diff --git a/src/lxc/start.c b/src/lxc/start.c index ebcd0c272..d735082d4 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -531,13 +531,13 @@ int lxc_poll(const char *name, struct lxc_handler *handler) if (has_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) { ERROR("Failed to add console handlers to mainloop"); goto out_mainloop_console; } - ret = lxc_console_mainloop_add(&descr_console, console); + ret = lxc_terminal_mainloop_add(&descr_console, console); if (ret < 0) { ERROR("Failed to add console handlers to console mainloop"); goto out_mainloop_console;