Changeset 27dccae in rtems for c/src/lib/libc/termios.c


Ignore:
Timestamp:
May 20, 1998, 5:09:12 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
fe2401b2
Parents:
2efdd08
Message:

Patch to add return status to rtems_termios_enqueue_raw_characters from
Eric Norum per request from Geoffroy Montel:

The rtems_termios_enqueue_raw_characters function type is void.
The problem is that I can't return an error message if the input
buffer is full.
Could we add a return value?

Sure, but what would you do with the overflow indication? POSIX says,
when the input limit is reached, the saved characters are thrown away
without notice.

Anyhow, the change is so small I've done it and enclosed the patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libc/termios.c

    r2efdd08 r27dccae  
    838838 * NOTE: This routine runs in the context of the
    839839 *       device receive interrupt handler.
    840  */
    841 void
     840 * Returns the number of characters dropped because of overlow.
     841 */
     842int
    842843rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
    843844{
     
    856857        }
    857858        rtems_semaphore_release (tty->rawInBufSemaphore);
     859        return len;
    858860}
    859861
Note: See TracChangeset for help on using the changeset viewer.