From: Ivan Kruglov Date: Fri, 20 Dec 2024 15:16:56 +0000 (+0100) Subject: machine: add debugging info to trace #35115 X-Git-Tag: v258-rc1~1783 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=544b7718b33f4e7b0c9887e90a0261cef1b0a1d6;p=thirdparty%2Fsystemd.git machine: add debugging info to trace #35115 --- diff --git a/src/machine/machine.c b/src/machine/machine.c index 587c2267b69..7f5f48bd9b1 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -804,8 +804,10 @@ int machine_start_shell( /* First try to get an fd for the PTY peer via the new racefree ioctl(), directly. Otherwise go via * joining the namespace, because it goes by path */ pty_fd = pty_open_peer_racefree(ptmx_fd, O_RDWR|O_NOCTTY|O_CLOEXEC); - if (ERRNO_IS_NEG_NOT_SUPPORTED(pty_fd)) + if (ERRNO_IS_NEG_NOT_SUPPORTED(pty_fd)) { + log_debug_errno(pty_fd, "Failed to get PTY peer via racefree ioctl() (ptmx_fd=%d). Trying via joining the namespace (ptmx_name=%s): %m", ptmx_fd, ptmx_name); pty_fd = machine_open_terminal(m, ptmx_name, O_RDWR|O_NOCTTY|O_CLOEXEC); + } if (pty_fd < 0) return log_debug_errno(pty_fd, "Failed to open terminal: %m");