]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
terminal: lxc_terminal_setup()
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 28 Feb 2018 11:23:06 +0000 (12:23 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 28 Feb 2018 16:08:08 +0000 (17:08 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/terminal.c

index 3369603b0b360b0fdd648857c911115095bdb2fa..715982bb550ba1ac6a98715ded5e897658871ad6 100644 (file)
@@ -907,8 +907,8 @@ int lxc_terminal_setup(struct lxc_conf *conf)
        int ret;
        struct lxc_terminal *terminal = &conf->console;
 
-       if (terminal->path && !strcmp(terminal->path, "none")) {
-               INFO("No terminal was requested");
+       if (terminal->path && strcmp(terminal->path, "none") == 0) {
+               INFO("No terminal requested");
                return 0;
        }
 
@@ -916,12 +916,10 @@ int lxc_terminal_setup(struct lxc_conf *conf)
        if (ret < 0)
                return -1;
 
-       /* create terminal log file */
        ret = lxc_terminal_create_log_file(terminal);
        if (ret < 0)
                goto err;
 
-       /* create terminal ringbuffer */
        ret = lxc_terminal_create_ringbuf(terminal);
        if (ret < 0)
                goto err;