source: rtems/cpukit/libfs/src/devfs/devioctl.c @ df01da67

4.115
Last change on this file since df01da67 was df01da67, checked in by Sebastian Huber <sebastian.huber@…>, on 05/14/12 at 11:16:31

Filesystem: Use ioctl_command_t

  • Property mode set to 100644
File size: 744 bytes
RevLine 
[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
16int 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.