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

4.104.115
Last change on this file since ec9e8a9 was ec9e8a9, checked in by Joel Sherrill <joel.sherrill@…>, on 09/18/08 at 13:21:49

2008-09-18 Miao Yan <yanmiaobest@…>

  • libfs/src/devfs/devclose.c, libfs/src/devfs/devfs_eval.c, libfs/src/devfs/devioctl.c, libfs/src/devfs/devopen.c, libfs/src/devfs/devread.c, libfs/src/devfs/devwrite.c: Fix warnings.
  • Property mode set to 100644
File size: 787 bytes
Line 
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 *  $Id$
8 */
9
10#include "config.h"
11#endif
12
13#include <rtems.h>
14#include <rtems/io.h>
15
16#include "devfs.h"
17
18int devFS_ioctl(
19  rtems_libio_t *iop,
20  uint32_t       command,
21  void          *buffer
22)
23{
24  rtems_libio_ioctl_args_t  args;
25  rtems_status_code         status;
26  rtems_device_name_t      *np;
27
28  np           = (rtems_device_name_t *)iop->file_info;
29
30  args.iop     = iop;
31  args.command = command;
32  args.buffer  = buffer;
33
34  status = rtems_io_control(
35    np->major,
36    np->minor,
37    (void *) &args
38  );
39
40  if ( status )
41    return rtems_deviceio_errno(status);
42
43  return args.ioctl_return;
44}
45
Note: See TracBrowser for help on using the repository browser.