]> git.proxmox.com Git - mirror_lxc.git/commitdiff
terminal: log at warning message
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 11 Oct 2021 13:21:45 +0000 (15:21 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 11 Oct 2021 13:22:52 +0000 (15:22 +0200)
The lxc_devpts_terminal() helper is called in contexts where it can fail
due to various reasons but where we safely fallback to allocating
terminal devices on the host. Logging error messages irritates users so
just log warning messages.

Link: https://discuss.linuxcontainers.org/t/lxc-attach-error-failed-to-open-terminal-multiplexer-device
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/terminal.c

index 8c84f2875d1ded2cc6e44d5e140aa6b6ff628f68..c5bf8cdfe3c5bc2507ac50dbfdf806b3b77e957f 100644 (file)
@@ -967,17 +967,17 @@ int lxc_devpts_terminal(int devpts_fd, int *ret_ptx, int *ret_pty,
                if (errno == ENOSPC)
                        return systrace("Exceeded number of allocatable terminals");
 
-               return syserror("Failed to open terminal multiplexer device");
+               return syswarn("Failed to open terminal multiplexer device");
        }
 
        if (devpts_fd < 0) {
                fd_devpts = open_at(-EBADF, "/dev/pts", PROTECT_OPATH_DIRECTORY,
                                    PROTECT_LOOKUP_ABSOLUTE_XDEV, 0);
                if (fd_devpts < 0)
-                       return syserror("Failed to open devpts instance");
+                       return syswarn("Failed to open devpts instance");
 
                if (!same_device(fd_devpts, "ptmx", fd_ptx, ""))
-                       return syserror("The acquired ptmx devices don't match");
+                       return syswarn("The acquired ptmx devices don't match");
                devpts_fd = fd_devpts;
        }