summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock/include/rtems/blkdev.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2009-08-06 03:58:09 +0000
committerChris Johns <chrisj@rtems.org>2009-08-06 03:58:09 +0000
commit945884fe9fc662bcce68f5ed61127c3e6ddef467 (patch)
tree843e527efdb5ec376c40068ca1fb494fef5175c1 /cpukit/libblock/include/rtems/blkdev.h
parent2009-08-05 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-945884fe9fc662bcce68f5ed61127c3e6ddef467.tar.bz2
2009-08-06 Chris Johns <chrisj@rtems.org>
* libblock/src/bdbuf.c: Fix group user logic. * libblock/include/rtems/blkdev.h, libblock/src/blkdev.c, libblock/src/nvdisk.c, libblock/src/flashdisk.c: Add set block size, and get media block size support.
Diffstat (limited to 'cpukit/libblock/include/rtems/blkdev.h')
-rw-r--r--cpukit/libblock/include/rtems/blkdev.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/cpukit/libblock/include/rtems/blkdev.h b/cpukit/libblock/include/rtems/blkdev.h
index 40a7541731..bd329c7bdd 100644
--- a/cpukit/libblock/include/rtems/blkdev.h
+++ b/cpukit/libblock/include/rtems/blkdev.h
@@ -48,9 +48,9 @@ typedef uint32_t rtems_blkdev_bnum;
* Block device request type.
*/
typedef enum rtems_blkdev_request_op {
- RTEMS_BLKDEV_REQ_READ,
- RTEMS_BLKDEV_REQ_WRITE,
- RTEMS_BLKDEV_CAPABILITIES
+ RTEMS_BLKDEV_REQ_READ, /**< Read the requested blocks of data. */
+ RTEMS_BLKDEV_REQ_WRITE, /**< Write the requested blocks of data. */
+ RTEMS_BLKDEV_CAPABILITIES /**< Return the driver capabilities set. */
} rtems_blkdev_request_op;
/**
@@ -160,10 +160,12 @@ typedef struct rtems_blkdev_request {
* @{
*/
-#define RTEMS_BLKIO_REQUEST _IOWR('B', 1, rtems_blkdev_request)
-#define RTEMS_BLKIO_GETBLKSIZE _IO('B', 2)
-#define RTEMS_BLKIO_GETSIZE _IO('B', 3)
-#define RTEMS_BLKIO_SYNCDEV _IO('B', 4)
+#define RTEMS_BLKIO_REQUEST _IOWR('B', 1, rtems_blkdev_request)
+#define RTEMS_BLKIO_GETMEDIABLKSIZE _IO('B', 2)
+#define RTEMS_BLKIO_GETBLKSIZE _IO('B', 3)
+#define RTEMS_BLKIO_SETBLKSIZE _IO('B', 4)
+#define RTEMS_BLKIO_GETSIZE _IO('B', 5)
+#define RTEMS_BLKIO_SYNCDEV _IO('B', 6)
/** @} */
@@ -242,6 +244,14 @@ rtems_blkdev_generic_ioctl(
void * arg
);
+/**
+ * Common IO control primitive.
+ *
+ * Use this in all block devices to handle the common set of ioctl requests.
+ */
+int
+rtems_blkdev_ioctl(dev_t dev, uint32_t req, void *argp);
+
/** @} */
#ifdef __cplusplus