summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2011-01-21 09:43:24 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2011-01-21 09:43:24 +0000
commit1680638ab6def119716eb0e291b717471c88ff7d (patch)
tree391df2903d0045cff0e01976e445a1791790e15c /cpukit/libblock
parent2011-01-20 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-1680638ab6def119716eb0e291b717471c88ff7d.tar.bz2
2011-01-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libblock/src/blkdev-ops.c: New file. * libblock/Makefile.am: Reflect change from above. * libblock/include/rtems/blkdev.h: Declare rtems_blkdev_generic_ops.
Diffstat (limited to 'cpukit/libblock')
-rw-r--r--cpukit/libblock/Makefile.am6
-rw-r--r--cpukit/libblock/include/rtems/blkdev.h5
-rw-r--r--cpukit/libblock/src/blkdev-ops.c32
3 files changed, 42 insertions, 1 deletions
diff --git a/cpukit/libblock/Makefile.am b/cpukit/libblock/Makefile.am
index 647adfe49d..15c3852da4 100644
--- a/cpukit/libblock/Makefile.am
+++ b/cpukit/libblock/Makefile.am
@@ -6,7 +6,11 @@ include $(top_srcdir)/automake/multilib.am
include $(top_srcdir)/automake/compile.am
noinst_LIBRARIES = libblock.a
-libblock_a_SOURCES = src/bdbuf.c src/blkdev.c src/diskdevs.c src/flashdisk.c \
+libblock_a_SOURCES = src/bdbuf.c \
+ src/blkdev.c \
+ src/blkdev-ops.c \
+ src/diskdevs.c \
+ src/flashdisk.c \
src/ramdisk-driver.c \
src/ramdisk-init.c \
src/ramdisk-config.c \
diff --git a/cpukit/libblock/include/rtems/blkdev.h b/cpukit/libblock/include/rtems/blkdev.h
index 85907278e9..e9fa86b248 100644
--- a/cpukit/libblock/include/rtems/blkdev.h
+++ b/cpukit/libblock/include/rtems/blkdev.h
@@ -262,6 +262,11 @@ rtems_blkdev_generic_ioctl(
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp);
+/**
+ * @brief Generic block operations driver address table.
+ */
+extern const rtems_driver_address_table rtems_blkdev_generic_ops;
+
/** @} */
#ifdef __cplusplus
diff --git a/cpukit/libblock/src/blkdev-ops.c b/cpukit/libblock/src/blkdev-ops.c
new file mode 100644
index 0000000000..6cc0c3009e
--- /dev/null
+++ b/cpukit/libblock/src/blkdev-ops.c
@@ -0,0 +1,32 @@
+/**
+ * @file
+ *
+ * @ingroup rtems_blkdev
+ *
+ * @brief Block device management.
+ */
+
+/*
+ * Copyright (c) 2011 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * 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.
+ */
+
+#include <rtems/blkdev.h>
+
+const rtems_driver_address_table rtems_blkdev_generic_ops = {
+ .initialization_entry = NULL,
+ .open_entry = rtems_blkdev_generic_open,
+ .close_entry = rtems_blkdev_generic_close,
+ .read_entry = rtems_blkdev_generic_read,
+ .write_entry = rtems_blkdev_generic_write,
+ .control_entry = rtems_blkdev_generic_ioctl
+};