From 564e31c4b0a70e7ac2991d58c0795f18c17e3279 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Tue, 27 Feb 2018 17:08:46 +0100 Subject: [PATCH] console: lxc_terminal_setup() Signed-off-by: Christian Brauner --- src/lxc/console.c | 2 +- src/lxc/console.h | 8 ++++---- src/lxc/start.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lxc/console.c b/src/lxc/console.c index 3a1d6bd78..37011a44f 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -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; diff --git a/src/lxc/console.h b/src/lxc/console.h index 97d017158..e234545a2 100644 --- a/src/lxc/console.h +++ b/src/lxc/console.h @@ -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. diff --git a/src/lxc/start.c b/src/lxc/start.c index ef87d136f..08abb00ba 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -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) { -- 2.39.5