]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
console: lxc_terminal_create()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 27 Feb 2018 15:51:40 +0000 (16:51 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 27 Feb 2018 21:25:04 +0000 (22:25 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/console.c
src/lxc/console.h
src/lxc/start.c

index d2a3698d1bdc0c11f6f6c470565988f4e754510c..225f2744509fde7586e3e012eef076752f2703a7 100644 (file)
@@ -874,7 +874,7 @@ err:
        return -ENODEV;
 }
 
-int lxc_console_create(struct lxc_conf *conf)
+int lxc_terminal_create(struct lxc_conf *conf)
 {
        int ret;
        struct lxc_pty *console = &conf->console;
index 617a9b178d5c1b521be77891a301c59c9652951d..09b13877870774aff982a84088330c9b90cfa59b 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_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.
  */
-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
- * - 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
  *   /dev/tty)
  * Registered handlers in a mainloop are not automatically deleted.
index e28d3faeee82b3c7b5ed62756a7ad306bc0ca2a1..579da8cbe26f38884945ee20388c64c206187378 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_console_create(conf);
+       ret = lxc_terminal_create(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_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.
         */
         if (handler->conf->console.slave >= 0) {