mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
2003-09-26 Cedric Aubert <cedric_aubert@yahoo.fr>
PR 501/rtems_misc * console.c: console_open disables ICANON on non-console port, which should be ok for the first open but not for subsequent ones. If you open one serial port, you will configure it, when you reopen it you will lost the ICANON parameters if you had put it. Should be done by console only at first open.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2003-09-26 Cedric Aubert <cedric_aubert@yahoo.fr>
|
||||||
|
|
||||||
|
PR 501/rtems_misc
|
||||||
|
* console.c: console_open disables ICANON on non-console port, which
|
||||||
|
should be ok for the first open but not for subsequent ones. If you
|
||||||
|
open one serial port, you will configure it, when you reopen it you
|
||||||
|
will lost the ICANON parameters if you had put it. Should be done by
|
||||||
|
console only at first open.
|
||||||
|
|
||||||
2003-09-04 Joel Sherrill <joel@OARcorp.com>
|
2003-09-04 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
* bootcard.c, bspclean.c, clockdrv_shell.c, console-polled.c,
|
* bootcard.c, bspclean.c, clockdrv_shell.c, console-polled.c,
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
|
#include <rtems/termiostypes.h>
|
||||||
#include <libchip/serial.h>
|
#include <libchip/serial.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -50,6 +51,7 @@ rtems_device_driver console_open(
|
|||||||
struct termios Termios;
|
struct termios Termios;
|
||||||
rtems_termios_callbacks Callbacks;
|
rtems_termios_callbacks Callbacks;
|
||||||
console_tbl *cptr;
|
console_tbl *cptr;
|
||||||
|
struct rtems_termios_tty *current_tty;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Verify the port number is valid.
|
* Verify the port number is valid.
|
||||||
@@ -79,19 +81,27 @@ rtems_device_driver console_open(
|
|||||||
|
|
||||||
status = rtems_termios_open ( major, minor, arg, &Callbacks );
|
status = rtems_termios_open ( major, minor, arg, &Callbacks );
|
||||||
Console_Port_Data[minor].termios_data = args->iop->data1;
|
Console_Port_Data[minor].termios_data = args->iop->data1;
|
||||||
|
|
||||||
if (minor!=Console_Port_Minor) {
|
/* Get tty pointeur from the Console_Port_Data */
|
||||||
/*
|
current_tty = Console_Port_Data[minor].termios_data;
|
||||||
* If this is not the console we do not want ECHO and
|
|
||||||
* so forth
|
if ( (current_tty->refcount == 1) ) {
|
||||||
*/
|
/*
|
||||||
IoctlArgs.iop=args->iop;
|
* If it's the first open, modified, if need, the port parameters
|
||||||
IoctlArgs.command=RTEMS_IO_GET_ATTRIBUTES;
|
*/
|
||||||
IoctlArgs.buffer=&Termios;
|
if (minor!=Console_Port_Minor) {
|
||||||
rtems_termios_ioctl(&IoctlArgs);
|
/*
|
||||||
Termios.c_lflag=ICANON;
|
* If this is not the console we do not want ECHO and
|
||||||
IoctlArgs.command=RTEMS_IO_SET_ATTRIBUTES;
|
* so forth
|
||||||
rtems_termios_ioctl(&IoctlArgs);
|
*/
|
||||||
|
IoctlArgs.iop=args->iop;
|
||||||
|
IoctlArgs.command=RTEMS_IO_GET_ATTRIBUTES;
|
||||||
|
IoctlArgs.buffer=&Termios;
|
||||||
|
rtems_termios_ioctl(&IoctlArgs);
|
||||||
|
Termios.c_lflag=ICANON;
|
||||||
|
IoctlArgs.command=RTEMS_IO_SET_ATTRIBUTES;
|
||||||
|
rtems_termios_ioctl(&IoctlArgs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
|
if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user