source: rtems/c/src/lib/libc/ioctl.c @ b2b4835

4.104.114.84.95
Last change on this file since b2b4835 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

  • Property mode set to 100644
File size: 866 bytes
Line 
1/*
2 *  ioctl() system call
3 *
4 *  This routine is not defined in the POSIX 1003.1b standard but is
5 *  commonly supported on most UNIX and POSIX systems.
6 *
7 *  COPYRIGHT (c) 1989-1999.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#include "libio_.h"
18
19int ioctl(
20  int         fd,
21  unsigned32  command,
22  void *      buffer
23)
24{
25  rtems_status_code  rc;
26  rtems_libio_t     *iop;
27
28  rtems_libio_check_fd( fd );
29  iop = rtems_libio_iop( fd );
30  rtems_libio_check_is_open(iop);
31
32  /*
33   *  Now process the ioctl().
34   */
35
36  if ( !iop->handlers->ioctl )
37    set_errno_and_return_minus_one( ENOTSUP );
38
39  rc = (*iop->handlers->ioctl)( iop, command, buffer );
40
41  return rc;
42}
Note: See TracBrowser for help on using the repository browser.