Skip to content

Tcgetattr show error promp if stdin is not a tty. #97

Open
AlexanderAmelkin opened this issue Mar 1, 2018 · 0 comments
Open

Tcgetattr show error promp if stdin is not a tty. #97

AlexanderAmelkin opened this issue Mar 1, 2018 · 0 comments

Comments

@AlexanderAmelkin
Copy link

Reported by: Elaine Li
Original Ticket: ipmitool/bugs/506

When start an SoL session via devconsole command, it always show 'tcgetattr: Invalid argument' at the top of the screen. If stdin is not a tty, we don't have to enter raw mode.
Add patch for tcgetattr error prompt.

--- ipmitool-1.8.18.orig/lib/ipmi_sol.c 2016-06-30 02:06:29.000000000 +0800
+++ ipmitool-1.8.18.new/lib/ipmi_sol.c 2018-02-27 19:03:04.686552700 +0800
@@ -1165,6 +1165,8 @@
enter_raw_mode(void)
{
struct termios tio;

  • if (isatty(fileno(stdin)) == 0)
  •    return;
    
    if (tcgetattr(fileno(stdin), &tio) == -1) {
    perror("tcgetattr");
    return;
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant