RTEMS Logo

RTEMS 4.6.99.3 On-Line Library


ioctl

PREV UP NEXT Bookshelf RTEMS Filesystem Design Guide

4.14: ioctl

File:

ioctl.c

Processing:

Not defined in the POSIX 1003.1b standard but commonly supported in most UNIX and POSIX system. Ioctl() is a catchall for I/O operations. Routine is layered on external network handlers and filesystem specific handlers. The development of new filesystems should not alter the basic processing performed by this routine.

Development Comments:

The file descriptor is examined to determine if it is associated with a network device. If it is processing is mapped to an external network handler. The value returned by this handler is then returned to the calling program.

File descriptors that are associated with a filesystem undergo the following processing:

  1. The file descriptor index is used to obtain the associated file control block.
  2. The file descriptor value is range checked.
  3. A test is made to determine if the handler table that is referenced in the file control block contains an entry for the ioctl() handler function. If it does not, an error is returned to the calling routine.
  4. If the ioctl() handler function exists, it is called with the file control block, the command and buffer as its parameters.
  5. The return code from this function is then sent to the calling routine.


PREV UP NEXT Bookshelf RTEMS Filesystem Design Guide

Copyright © 1988-2004 OAR Corporation