RTEMS Logo

RTEMS 4.6.99.3 On-Line Library


fcntl()

PREV UP NEXT Bookshelf RTEMS Filesystem Design Guide

4.10: fcntl()

File:

fcntl.c

Processing:

This routine currently only interacts with the file control block. If the structure of the file control block and the associated meanings do not change, the partial implementation of fcntl() should remain unaltered for other filesystem implementations.

Development Comments:

The only commands that have been implemented are the F_GETFD and F_SETFD. The commands manipulate the LIBIO_FLAGS_CLOSE_ON_EXEC bit in the flags element of the file control block associated with the file descriptor index.

The current implementation of the function performs the sequence of operations below:

  1. Test to see if we are trying to operate on a file descriptor associated with a network connection
  2. Obtain the file control block that is associated with the file descriptor index
  3. Perform a range check on the file descriptor index.


PREV UP NEXT Bookshelf RTEMS Filesystem Design Guide

Copyright © 1988-2004 OAR Corporation