4.115
Rev | Line | |
---|
[d40da79b] | 1 | #if HAVE_CONFIG_H |
---|
| 2 | /* |
---|
| 3 | * The license and distribution terms for this file may be |
---|
| 4 | * found in the file LICENSE in this distribution or at |
---|
| 5 | * http://www.rtems.com/license/LICENSE. |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "config.h" |
---|
| 9 | #endif |
---|
| 10 | |
---|
| 11 | #include <rtems.h> |
---|
| 12 | #include <rtems/io.h> |
---|
| 13 | |
---|
| 14 | #include "devfs.h" |
---|
| 15 | |
---|
| 16 | int devFS_ioctl( |
---|
[df01da67] | 17 | rtems_libio_t *iop, |
---|
| 18 | ioctl_command_t command, |
---|
| 19 | void *buffer |
---|
[d40da79b] | 20 | ) |
---|
| 21 | { |
---|
| 22 | rtems_libio_ioctl_args_t args; |
---|
| 23 | rtems_status_code status; |
---|
[3b7c123] | 24 | const devFS_node *np = iop->pathinfo.node_access; |
---|
[d40da79b] | 25 | |
---|
| 26 | args.iop = iop; |
---|
| 27 | args.command = command; |
---|
| 28 | args.buffer = buffer; |
---|
| 29 | |
---|
| 30 | status = rtems_io_control( |
---|
| 31 | np->major, |
---|
| 32 | np->minor, |
---|
| 33 | (void *) &args |
---|
| 34 | ); |
---|
| 35 | |
---|
| 36 | if ( status ) |
---|
| 37 | return rtems_deviceio_errno(status); |
---|
| 38 | |
---|
| 39 | return args.ioctl_return; |
---|
| 40 | } |
---|
| 41 | |
---|
Note: See
TracBrowser
for help on using the repository browser.