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

index f4e1e9906189d911a609b3ca07e20f133da72166..d19bc1b9db6e4b4b7cd77254526b6f0574811426 100644 (file)
@@ -996,7 +996,7 @@ static int lxc_attach_pty(struct lxc_conf *conf, struct lxc_pty *pty)
        return 0;
 
 on_error:
-       lxc_console_delete(pty);
+       lxc_terminal_delete(pty);
        lxc_pty_conf_free(pty);
        return -1;
 }
@@ -1386,7 +1386,7 @@ int lxc_attach(const char *name, const char *lxcpath,
                        (void)wait_for_pid(to_cleanup_pid);
 
                if (options->attach_flags & LXC_ATTACH_ALLOCATE_PTY) {
-                       lxc_console_delete(&pty);
+                       lxc_terminal_delete(&pty);
                        lxc_pty_conf_free(&pty);
                }
                lxc_proc_put_context_info(init_ctx);
index 29206daa5911451caca4ae6166303cdad7ee7321..33d299598e7a6b36a4ac354739cc695d698fa59e 100644 (file)
@@ -738,7 +738,7 @@ int lxc_terminal_write_ringbuffer(struct lxc_pty *console)
        return 0;
 }
 
-void lxc_console_delete(struct lxc_pty *console)
+void lxc_terminal_delete(struct lxc_pty *console)
 {
        int ret;
 
@@ -870,7 +870,7 @@ int lxc_pty_create(struct lxc_pty *console)
        return 0;
 
 err:
-       lxc_console_delete(console);
+       lxc_terminal_delete(console);
        return -ENODEV;
 }
 
@@ -901,7 +901,7 @@ int lxc_console_create(struct lxc_conf *conf)
        return 0;
 
 err:
-       lxc_console_delete(console);
+       lxc_terminal_delete(console);
        return -ENODEV;
 }
 
index a4d56d601152071e1c953b3fff3cd39c8d766d79..d8e8d532c5b92d4579103f70fa2bbfe4dc84618b 100644 (file)
@@ -98,7 +98,7 @@ extern int  lxc_console_create(struct lxc_conf *);
  *   /dev/tty)
  * Registered handlers in a mainloop are not automatically deleted.
  */
-extern void lxc_console_delete(struct lxc_pty *);
+extern void lxc_terminal_delete(struct lxc_pty *);
 
 /*
  * lxc_terminal_free: mark the console or a tty as unallocated, free any
index d735082d4c1d570c53faaab5e9bf1841e5881c67..e28d3faeee82b3c7b5ed62756a7ad306bc0ca2a1 100644 (file)
@@ -950,7 +950,7 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
        if (ret < 0)
                WARN("%s - Failed to restore signal mask", strerror(errno));
 
-       lxc_console_delete(&handler->conf->console);
+       lxc_terminal_delete(&handler->conf->console);
        lxc_delete_tty(&handler->conf->tty_info);
 
        /* The command socket is now closed, no more state clients can register