libio: Add rtems_libio_iop_is_readable()

Update #3132.
This commit is contained in:
Sebastian Huber
2017-09-13 10:35:45 +02:00
parent bbcdc302cd
commit a937a5a534
3 changed files with 13 additions and 3 deletions

View File

@@ -255,7 +255,7 @@ rtems_device_driver console_open(
}
}
if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
if (rtems_libio_iop_is_readable(args->iop) &&
cptr->pDeviceFlow &&
cptr->pDeviceFlow->deviceStartRemoteTx) {
cptr->pDeviceFlow->deviceStartRemoteTx(minor);
@@ -288,7 +288,7 @@ rtems_device_driver console_close(
* Stop only if it's the last one opened.
*/
if ( (current_tty->refcount == 1) ) {
if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
if (rtems_libio_iop_is_readable(args->iop) &&
cptr->pDeviceFlow &&
cptr->pDeviceFlow->deviceStopRemoteTx) {
cptr->pDeviceFlow->deviceStopRemoteTx(minor);