blob: 9f3ec47e412bccb38c8ce231b589bd850b5b2b91 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#if HAVE_CONFIG_H
/*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#include "config.h"
#endif
#include <rtems.h>
#include <rtems/io.h>
#include "devfs.h"
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_driver_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
np->major,
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
return args.ioctl_return;
}
|