1 From 1e47ecd9a9367e6cf166c872d3cec26eb4c77aba Mon Sep 17 00:00:00 2001
2 From: Christian Brauner <christian.brauner@ubuntu.com>
3 Date: Fri, 10 Nov 2017 19:51:57 +0100
4 Subject: [PATCH 12/13] console: report detach message on demand
6 When users pass -1 there's there won't be an escape sequence to exit the
7 console so no need to print a misleading info message about how to detach.
9 Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
11 src/lxc/console.c | 5 ++++-
12 1 file changed, 4 insertions(+), 1 deletion(-)
14 diff --git a/src/lxc/console.c b/src/lxc/console.c
15 index e95f5c54..8f6203f0 100644
16 --- a/src/lxc/console.c
17 +++ b/src/lxc/console.c
18 @@ -730,11 +730,14 @@ int lxc_console(struct lxc_container *c, int ttynum,
22 - fprintf(stderr, "\n"
23 + if (ts->escape >= 1) {
26 "Connected to tty %1$d\n"
27 "Type <Ctrl+%2$c q> to exit the console, "
28 "<Ctrl+%2$c Ctrl+%2$c> to enter Ctrl+%2$c itself\n",
29 ttynum, 'a' + escape - 1);
33 ret = lxc_setup_tios(stdinfd, &oldtios);