summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/devfs/devopen.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-05-14 15:19:20 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-05-15 10:01:42 +0200
commitfed66f991014f40430b256d44231a7828bb8a413 (patch)
tree776084d409f4c21ed84c1c2da4d65993f10ef588 /cpukit/libfs/src/devfs/devopen.c
parentFilesystem: Use ioctl_command_t (diff)
downloadrtems-fed66f991014f40430b256d44231a7828bb8a413.tar.bz2
Filesystem: Add shared device IO support
The device IO file system support in IMFS, devFS, and RFS uses now a shared implementation.
Diffstat (limited to 'cpukit/libfs/src/devfs/devopen.c')
-rw-r--r--cpukit/libfs/src/devfs/devopen.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/cpukit/libfs/src/devfs/devopen.c b/cpukit/libfs/src/devfs/devopen.c
index adb8fe43b1..26450ab26b 100644
--- a/cpukit/libfs/src/devfs/devopen.c
+++ b/cpukit/libfs/src/devfs/devopen.c
@@ -5,14 +5,13 @@
*/
#if HAVE_CONFIG_H
-#include "config.h"
+ #include "config.h"
#endif
-#include <rtems.h>
-#include <rtems/io.h>
-
#include "devfs.h"
+#include <rtems/deviceio.h>
+
int devFS_open(
rtems_libio_t *iop,
const char *pathname,
@@ -20,19 +19,14 @@ int devFS_open(
mode_t mode
)
{
- rtems_libio_open_close_args_t args;
- rtems_status_code status;
const devFS_node *np = iop->pathinfo.node_access;
- args.iop = iop;
- args.flags = iop->flags;
- args.mode = mode;
-
- status = rtems_io_open(
+ return rtems_deviceio_open(
+ iop,
+ pathname,
+ oflag,
+ mode,
np->major,
- np->minor,
- (void *) &args
+ np->minor
);
-
- return rtems_deviceio_errno(status);
}