diff --git a/doc/lxc.container.conf.sgml.in b/doc/lxc.container.conf.sgml.in
index 9b9b210d4..e0697fd1e 100644
--- a/doc/lxc.container.conf.sgml.in
+++ b/doc/lxc.container.conf.sgml.in
@@ -685,7 +685,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
+
@@ -1619,7 +1619,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
The path to the console output of the container if not NULL.
- [] []
+ [] []
diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index d79c03793..bf1771029 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
@@ -114,7 +114,7 @@ lxc_config_define(net);
lxc_config_define(cap_drop);
lxc_config_define(cap_keep);
lxc_config_define(console_logfile);
-lxc_config_define(console);
+lxc_config_define(console_path);
lxc_config_define(seccomp);
lxc_config_define(includefiles);
lxc_config_define(autodev);
@@ -232,11 +232,16 @@ static struct lxc_config_t config[] = {
{ "lxc.cap.drop", set_config_cap_drop, get_config_cap_drop, clr_config_cap_drop, },
{ "lxc.cap.keep", set_config_cap_keep, get_config_cap_keep, clr_config_cap_keep, },
{ "lxc.console.logfile", set_config_console_logfile, get_config_console_logfile, clr_config_console_logfile, },
- { "lxc.console", set_config_console, get_config_console, clr_config_console, },
+ { "lxc.console.path", set_config_console_path, get_config_console_path, clr_config_console_path, },
{ "lxc.seccomp", set_config_seccomp, get_config_seccomp, clr_config_seccomp, },
{ "lxc.include", set_config_includefiles, get_config_includefiles, clr_config_includefiles, },
{ "lxc.autodev", set_config_autodev, get_config_autodev, clr_config_autodev, },
+ /* REMOVE IN LXC 3.0
+ legacy console key
+ */
+ { "lxc.console", set_config_console_path, get_config_console_path, clr_config_console_path, },
+
/* REMOVE IN LXC 3.0
legacy singal keys
*/
@@ -1936,8 +1941,8 @@ static int set_config_cap_drop(const char *key, const char *value,
return ret;
}
-static int set_config_console(const char *key, const char *value,
- struct lxc_conf *lxc_conf, void *data)
+static int set_config_console_path(const char *key, const char *value,
+ struct lxc_conf *lxc_conf, void *data)
{
return set_config_path_item(&lxc_conf->console.path, value);
}
@@ -3153,8 +3158,8 @@ static int get_config_cap_keep(const char *key, char *retv, int inlen,
return fulllen;
}
-static int get_config_console(const char *key, char *retv, int inlen,
- struct lxc_conf *c, void *data)
+static int get_config_console_path(const char *key, char *retv, int inlen,
+ struct lxc_conf *c, void *data)
{
return lxc_get_conf_str(retv, inlen, c->console.path);
}
@@ -3508,8 +3513,8 @@ static inline int clr_config_cap_keep(const char *key, struct lxc_conf *c,
return lxc_clear_config_keepcaps(c);
}
-static inline int clr_config_console(const char *key, struct lxc_conf *c,
- void *data)
+static inline int clr_config_console_path(const char *key, struct lxc_conf *c,
+ void *data)
{
free(c->console.path);
c->console.path = NULL;
diff --git a/src/lxc/criu.c b/src/lxc/criu.c
index 6fa42b246..d9fe2a60d 100644
--- a/src/lxc/criu.c
+++ b/src/lxc/criu.c
@@ -83,7 +83,7 @@ struct criu_opts {
/* The path that is bind mounted from /dev/console, if any. We don't
* want to use `--ext-mount-map auto`'s result here because the pts
* device may have a different path (e.g. if the pty number is
- * different) on the target host. NULL if lxc.console = "none".
+ * different) on the target host. NULL if lxc.console.path = "none".
*/
char *console_name;
@@ -106,8 +106,8 @@ static int load_tty_major_minor(char *directory, char *output, int len)
f = fopen(path, "r");
if (!f) {
/* This means we're coming from a liblxc which didn't export
- * the tty info. In this case they had to have lxc.console =
- * none, so there's no problem restoring.
+ * the tty info. In this case they had to have lxc.console.path
+ * = * none, so there's no problem restoring.
*/
if (errno == ENOENT)
return 0;
@@ -450,7 +450,7 @@ static void exec_criu(struct criu_opts *opts)
if (tty_info[0]) {
if (opts->console_fd < 0) {
- ERROR("lxc.console configured on source host but not target");
+ ERROR("lxc.console.path configured on source host but not target");
goto err;
}
diff --git a/src/tests/lxc-test-checkpoint-restore b/src/tests/lxc-test-checkpoint-restore
index 2adb131e9..09ec1e131 100755
--- a/src/tests/lxc-test-checkpoint-restore
+++ b/src/tests/lxc-test-checkpoint-restore
@@ -31,7 +31,7 @@ lxc-create -t ubuntu -n $name || FAIL "creating container"
cat >> "$(lxc-config lxc.lxcpath)/$name/config" <