OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libc/] [ioctl.c] - Blame information for rev 373

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
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: ioctl.c,v 1.2 2001-09-27 12:01:15 chris Exp $
15
 */
16
 
17
#include "libio_.h"
18
 
19
int 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.