Changeset 29e214e in rtems for c/src/lib/libbsp/shared/console.c
- Timestamp:
- 09/26/03 17:33:59 (19 years ago)
- Children:
- 2e9d1ef5
- Parents:
- 174bf23
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/shared/console.c
r174bf23 r29e214e 21 21 #include <termios.h> 22 22 23 #include <rtems/termiostypes.h> 23 24 #include <libchip/serial.h> 24 25 … … 51 52 rtems_termios_callbacks Callbacks; 52 53 console_tbl *cptr; 54 struct rtems_termios_tty *current_tty; 53 55 54 56 /* … … 80 82 status = rtems_termios_open ( major, minor, arg, &Callbacks ); 81 83 Console_Port_Data[minor].termios_data = args->iop->data1; 82 83 if (minor!=Console_Port_Minor) { 84 /* 85 * If this is not the console we do not want ECHO and 86 * so forth 87 */ 88 IoctlArgs.iop=args->iop; 89 IoctlArgs.command=RTEMS_IO_GET_ATTRIBUTES; 90 IoctlArgs.buffer=&Termios; 91 rtems_termios_ioctl(&IoctlArgs); 92 Termios.c_lflag=ICANON; 93 IoctlArgs.command=RTEMS_IO_SET_ATTRIBUTES; 94 rtems_termios_ioctl(&IoctlArgs); 84 85 /* Get tty pointeur from the Console_Port_Data */ 86 current_tty = Console_Port_Data[minor].termios_data; 87 88 if ( (current_tty->refcount == 1) ) { 89 /* 90 * If it's the first open, modified, if need, the port parameters 91 */ 92 if (minor!=Console_Port_Minor) { 93 /* 94 * If this is not the console we do not want ECHO and 95 * so forth 96 */ 97 IoctlArgs.iop=args->iop; 98 IoctlArgs.command=RTEMS_IO_GET_ATTRIBUTES; 99 IoctlArgs.buffer=&Termios; 100 rtems_termios_ioctl(&IoctlArgs); 101 Termios.c_lflag=ICANON; 102 IoctlArgs.command=RTEMS_IO_SET_ATTRIBUTES; 103 rtems_termios_ioctl(&IoctlArgs); 104 } 95 105 } 96 106
Note: See TracChangeset
for help on using the changeset viewer.