From: Christian Brauner Date: Mon, 11 Oct 2021 13:21:45 +0000 (+0200) Subject: terminal: log at warning message X-Git-Tag: lxc-4.0.11~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b108edb7446c68abe87f60092e94d911dd273fe5;p=thirdparty%2Flxc.git terminal: log at warning message 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 --- diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c index 8c84f2875..c5bf8cdfe 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -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; }