Manpage states: "The cfmakeraw function sets the flags stored in the
termios structure (initialized by tcgetattr) to a state ... giving a
'raw I/O path'.
From: Manuel Bouyer <bouyer@netbsd.org>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
}
/* Set raw attributes on the pty. */
+ if (tcgetattr(master_fd, &tty) < 0)
+ perror("tcgetattr failed");
cfmakeraw(&tty);
- tcsetattr(slave_fd, TCSAFLUSH, &tty);
+ if (tcsetattr(slave_fd, TCSAFLUSH, &tty) < 0)
+ perror("tcsetattr failed");
fprintf(stderr, "char device redirected to %s\n", ptsname(master_fd));