4.104.114.84.95
Last change
on this file since c7016198 was
73f6236,
checked in by Joel Sherrill <joel.sherrill@…>, on 03/01/99 at 22:40:08
|
Patch from Eric Norum <eric@…> to eliminate external
IO handlers scheme that was implemented originally just to support
sockets. The file system IO switch is more general and works fine.
|
-
Property mode set to
100644
|
File size:
915 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-1998. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * Copyright assigned to U.S. Government, 1994. |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.OARcorp.com/rtems/license.html. |
---|
14 | * |
---|
15 | * $Id$ |
---|
16 | */ |
---|
17 | |
---|
18 | #include "libio_.h" |
---|
19 | |
---|
20 | int ioctl( |
---|
21 | int fd, |
---|
22 | unsigned32 command, |
---|
23 | void * buffer |
---|
24 | ) |
---|
25 | { |
---|
26 | rtems_status_code rc; |
---|
27 | rtems_libio_t *iop; |
---|
28 | |
---|
29 | rtems_libio_check_fd( fd ); |
---|
30 | iop = rtems_libio_iop( fd ); |
---|
31 | rtems_libio_check_is_open(iop); |
---|
32 | |
---|
33 | /* |
---|
34 | * Now process the ioctl(). |
---|
35 | */ |
---|
36 | |
---|
37 | if ( !iop->handlers->ioctl ) |
---|
38 | set_errno_and_return_minus_one( ENOTSUP ); |
---|
39 | |
---|
40 | rc = (*iop->handlers->ioctl)( iop, command, buffer ); |
---|
41 | |
---|
42 | return rc; |
---|
43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.