From d5a112dbfda23a1dfc0e8d5c22e474762da75f44 Mon Sep 17 00:00:00 2001 From: David Given Date: Thu, 30 May 2013 23:25:22 +0100 Subject: [PATCH] Some more termios compatibility options. --HG-- branch : dtrg-videocore --- plat/rpi/include/termios.h | 16 ++++++++++++++++ plat/rpi/libsys/tcgetattr.c | 1 + 2 files changed, 17 insertions(+) diff --git a/plat/rpi/include/termios.h b/plat/rpi/include/termios.h index 67bf98a48..8e0dbb8e8 100644 --- a/plat/rpi/include/termios.h +++ b/plat/rpi/include/termios.h @@ -15,12 +15,28 @@ struct termios tcflag_t c_iflag; tcflag_t c_oflag; tcflag_t c_lflag; + tcflag_t c_cflag; }; #define ONLCR 1 #define ECHO 2 #define INLCR 4 +/* Dummied parameters for compatibility --- only the ones above are + * honoured. */ + +#define BRKINT 0 +#define ICRNL 0 +#define INPCK 0 +#define ISTRIP 0 +#define IXON 0 +#define CS8 0 +#define ICANON 0 +#define IEXTEN 0 +#define ISIG 0 + +#define OPOST ONLCR + #define TCSANOW 0 #define TCSADRAIN 1 #define TCSAFLUSH 2 diff --git a/plat/rpi/libsys/tcgetattr.c b/plat/rpi/libsys/tcgetattr.c index 08c73f36b..3b099afb5 100644 --- a/plat/rpi/libsys/tcgetattr.c +++ b/plat/rpi/libsys/tcgetattr.c @@ -16,6 +16,7 @@ int tcgetattr(int fd, struct termios* t) t->c_iflag = _sys_ttyflags & INLCR; t->c_oflag = _sys_ttyflags & ONLCR; t->c_lflag = _sys_ttyflags & ECHO; + t->c_cflag = 0; return 0; } -- 2.34.1