From: Christian Brauner Date: Wed, 28 Feb 2018 11:22:23 +0000 (+0100) Subject: terminal: lxc_terminal_create() X-Git-Tag: lxc-3.0.0.beta1~4^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ded924414293fb727859e20354cdcc9057d5077;p=thirdparty%2Flxc.git terminal: lxc_terminal_create() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c index bc8c42af3..3369603b0 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -869,13 +869,11 @@ int lxc_terminal_create_log_file(struct lxc_terminal *terminal) int lxc_terminal_create(struct lxc_terminal *terminal) { - int ret, saved_errno; + int ret; - ret = openpty(&terminal->master, &terminal->slave, terminal->name, NULL, - NULL); - saved_errno = errno; + ret = openpty(&terminal->master, &terminal->slave, terminal->name, NULL, NULL); if (ret < 0) { - ERROR("%s - Failed to allocate a pty", strerror(saved_errno)); + SYSERROR("Failed to open terminal"); return -1; } @@ -893,7 +891,7 @@ int lxc_terminal_create(struct lxc_terminal *terminal) ret = lxc_terminal_peer_default(terminal); if (ret < 0) { - ERROR("Failed to allocate a peer pty device"); + ERROR("Failed to allocate proxy terminal"); goto err; }