console: lxc_terminal_create()

parent 43366ca2
...@@ -874,7 +874,7 @@ err: ...@@ -874,7 +874,7 @@ err:
return -ENODEV; return -ENODEV;
} }
int lxc_console_create(struct lxc_conf *conf) int lxc_terminal_create(struct lxc_conf *conf)
{ {
int ret; int ret;
struct lxc_pty *console = &conf->console; struct lxc_pty *console = &conf->console;
......
...@@ -85,15 +85,15 @@ extern int lxc_terminal_allocate(struct lxc_conf *conf, int sockfd, int *ttynum ...@@ -85,15 +85,15 @@ extern int lxc_terminal_allocate(struct lxc_conf *conf, int sockfd, int *ttynum
extern int lxc_pty_create(struct lxc_pty *console); extern int lxc_pty_create(struct lxc_pty *console);
/** /**
* lxc_console_create: Create a new pty. * lxc_terminal_create: Create a new pty.
* - In addition to lxc_pty_create() also sets up all pty logs. * - In addition to lxc_pty_create() also sets up all pty logs.
*/ */
extern int lxc_console_create(struct lxc_conf *); extern int lxc_terminal_create(struct lxc_conf *);
/* /*
* Delete a pty created via lxc_console_create(): * Delete a pty created via lxc_terminal_create():
* - set old terminal settings * - set old terminal settings
* - memory allocated via lxc_console_create() is free()ed. * - memory allocated via lxc_terminal_create() is free()ed.
* - close master/slave pty pair and allocated fd for the peer (usually * - close master/slave pty pair and allocated fd for the peer (usually
* /dev/tty) * /dev/tty)
* Registered handlers in a mainloop are not automatically deleted. * Registered handlers in a mainloop are not automatically deleted.
......
...@@ -804,7 +804,7 @@ int lxc_init(const char *name, struct lxc_handler *handler) ...@@ -804,7 +804,7 @@ int lxc_init(const char *name, struct lxc_handler *handler)
TRACE("Set up signal fd"); TRACE("Set up signal fd");
/* Do this after setting up signals since it might unblock SIGWINCH. */ /* Do this after setting up signals since it might unblock SIGWINCH. */
ret = lxc_console_create(conf); ret = lxc_terminal_create(conf);
if (ret < 0) { if (ret < 0) {
ERROR("Failed to create console"); ERROR("Failed to create console");
goto out_restore_sigmask; goto out_restore_sigmask;
...@@ -1198,7 +1198,7 @@ static int do_start(void *data) ...@@ -1198,7 +1198,7 @@ static int do_start(void *data)
/* Some init's such as busybox will set sane tty settings on stdin, /* Some init's such as busybox will set sane tty settings on stdin,
* stdout, stderr which it thinks is the console. We already set them * stdout, stderr which it thinks is the console. We already set them
* the way we wanted on the real terminal, and we want init to do its * the way we wanted on the real terminal, and we want init to do its
* setup on its console ie. the pty allocated in lxc_console_create() so * setup on its console ie. the pty allocated in lxc_terminal_create() so
* make sure that that pty is stdin,stdout,stderr. * make sure that that pty is stdin,stdout,stderr.
*/ */
if (handler->conf->console.slave >= 0) { if (handler->conf->console.slave >= 0) {
......
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