]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
console: lxc_terminal_setup()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 27 Feb 2018 16:08:46 +0000 (17:08 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 27 Feb 2018 21:33:38 +0000 (22:33 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/console.c
src/lxc/console.h
src/lxc/start.c

index 3a1d6bd78b017db7b0c0059b8fcca655c56150a8..37011a44faef7ceb7680f4fcbec07d7ed05cb3e7 100644 (file)
@@ -870,7 +870,7 @@ err:
        return -ENODEV;
 }
 
-int lxc_terminal_create(struct lxc_conf *conf)
+int lxc_terminal_setup(struct lxc_conf *conf)
 {
        int ret;
        struct lxc_pty *terminal = &conf->console;
index 97d017158fba43b545b09061361825a683f9ea50..e234545a25543261ed8c88a2113bfbf31878c66a 100644 (file)
@@ -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);
 
 /**
- * lxc_terminal_create: Create a new pty.
+ * lxc_terminal_setup: Create a new pty.
  * - In addition to lxc_pty_create() also sets up all pty logs.
  */
-extern int  lxc_terminal_create(struct lxc_conf *);
+extern int lxc_terminal_setup(struct lxc_conf *);
 
 /*
- * Delete a pty created via lxc_terminal_create():
+ * Delete a pty created via lxc_terminal_setup():
  * - set old terminal settings
- * - memory allocated via lxc_terminal_create() is free()ed.
+ * - memory allocated via lxc_terminal_setup() is free()ed.
  * - close master/slave pty pair and allocated fd for the peer (usually
  *   /dev/tty)
  * Registered handlers in a mainloop are not automatically deleted.
index ef87d136f978be446c5cbfd801d1898ec3c5e01d..08abb00baf2c3ad8881f1b81cbc00116b3dff262 100644 (file)
@@ -804,7 +804,7 @@ int lxc_init(const char *name, struct lxc_handler *handler)
        TRACE("Set up signal fd");
 
        /* Do this after setting up signals since it might unblock SIGWINCH. */
-       ret = lxc_terminal_create(conf);
+       ret = lxc_terminal_setup(conf);
        if (ret < 0) {
                ERROR("Failed to create console");
                goto out_restore_sigmask;
@@ -1198,7 +1198,7 @@ static int do_start(void *data)
        /* 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
         * 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_terminal_create() so
+        * setup on its console ie. the pty allocated in lxc_terminal_setup() so
         * make sure that that pty is stdin,stdout,stderr.
         */
         if (handler->conf->console.slave >= 0) {