From: Christian Brauner Date: Tue, 27 Feb 2018 15:48:21 +0000 (+0100) Subject: console: lxc_terminal_delete() X-Git-Tag: lxc-3.0.0.beta1~5^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aac071b31aea0ab8c569cf313d7a9ae966088d9;p=thirdparty%2Flxc.git console: lxc_terminal_delete() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/attach.c b/src/lxc/attach.c index f4e1e9906..d19bc1b9d 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -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); diff --git a/src/lxc/console.c b/src/lxc/console.c index 29206daa5..33d299598 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -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; } diff --git a/src/lxc/console.h b/src/lxc/console.h index a4d56d601..d8e8d532c 100644 --- a/src/lxc/console.h +++ b/src/lxc/console.h @@ -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 diff --git a/src/lxc/start.c b/src/lxc/start.c index d735082d4..e28d3faee 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -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