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

index 7f4d50b0e2f8372eb4b2d304efb3d2e5a120f87f..86fcf3a4f8a5c56c3ab005a86cd02301ff65d751 100644 (file)
@@ -748,7 +748,7 @@ static int lxc_cmd_console_callback(int fd, struct lxc_cmd_req *req,
        struct lxc_cmd_rsp rsp;
        int ttynum = PTR_TO_INT(req->data);
 
-       masterfd = lxc_console_allocate(handler->conf, fd, &ttynum);
+       masterfd = lxc_terminal_allocate(handler->conf, fd, &ttynum);
        if (masterfd < 0)
                goto out_close;
 
index f9ec6049f88457bfe4fe4ce44158ecb9f485db5e..60d471dc8c911fe5123114a8d782617de9d3f301 100644 (file)
@@ -451,7 +451,7 @@ int lxc_terminal_mainloop_add(struct lxc_epoll_descr *descr,
        }
 
        /* We cache the descr so that we can add an fd to it when someone
-        * does attach to it in lxc_console_allocate().
+        * does attach to it in lxc_terminal_allocate().
         */
        console->descr = descr;
        ret = lxc_terminal_mainloop_add_peer(console);
@@ -575,7 +575,7 @@ err1:
        return -1;
 }
 
-int lxc_console_allocate(struct lxc_conf *conf, int sockfd, int *ttyreq)
+int lxc_terminal_allocate(struct lxc_conf *conf, int sockfd, int *ttyreq)
 {
        int masterfd = -1, ttynum;
        struct lxc_tty_info *tty_info = &conf->tty_info;
index b7f05f5a4d74cb837d06ac0af7fcd09b1b9011d7..a64e7c254488f656454c7886c40a8018a216228b 100644 (file)
@@ -61,14 +61,14 @@ struct lxc_tty_state
 };
 
 /*
- * lxc_console_allocate: allocate the console or a tty
+ * lxc_terminal_allocate: allocate the console or a tty
  *
  * @conf    : the configuration of the container to allocate from
  * @sockfd  : the socket fd whose remote side when closed, will be an
  *            indication that the console or tty is no longer in use
  * @ttyreq  : the tty requested to be opened, -1 for any, 0 for the console
  */
-extern int  lxc_console_allocate(struct lxc_conf *conf, int sockfd, int *ttynum);
+extern int  lxc_terminal_allocate(struct lxc_conf *conf, int sockfd, int *ttynum);
 
 /*
  * Create a new pty:
@@ -102,7 +102,7 @@ extern void lxc_console_delete(struct lxc_pty *);
 
 /*
  * lxc_console_free: mark the console or a tty as unallocated, free any
- * resources allocated by lxc_console_allocate().
+ * resources allocated by lxc_terminal_allocate().
  *
  * @conf : the configuration of the container whose tty was closed
  * @fd   : the socket fd whose remote side was closed, which indicated