Changeset e814a23 in rtems


Ignore:
Timestamp:
Sep 16, 2016, 12:20:07 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
8c83cbc
Parents:
55e0be36
git-author:
Sebastian Huber <sebastian.huber@…> (09/16/16 12:20:07)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/19/16 05:52:34)
Message:

termios: Add IO control handler

Update #2785.

Location:
cpukit/libcsupport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/include/rtems/termiostypes.h

    r55e0be36 re814a23  
    182182    rtems_termios_device_context *context,
    183183    const struct termios         *term
     184  );
     185
     186  /**
     187   * @brief IO control handler.
     188   *
     189   * Invoked in case the Termios layer cannot deal with the IO request.
     190   *
     191   * @param[in] context The Termios device context.
     192   * @param[in] request The IO control request.
     193   * @param[in] buffer The IO control buffer.
     194   */
     195  int (*ioctl)(
     196    rtems_termios_device_context *context,
     197    ioctl_command_t               request,
     198    void                         *buffer
    184199  );
    185200
  • cpukit/libcsupport/src/termios.c

    r55e0be36 re814a23  
    782782    if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
    783783      sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
    784     }
    785     else {
     784    } else if (tty->handler.ioctl) {
     785      args->ioctl_return = (*tty->handler.ioctl) (tty->device_context,
     786        args->command, args->buffer);
     787      sc = RTEMS_SUCCESSFUL;
     788    } else {
    786789      sc = RTEMS_INVALID_NUMBER;
    787790    }
Note: See TracChangeset for help on using the changeset viewer.