[rtems commit] libblock: New support functions

Sebastian Huber sebh at rtems.org
Tue Mar 13 11:31:32 UTC 2012


Module:    rtems
Branch:    master
Commit:    3ee7b84394d3747d9b8010006c3e75ac10839abe
Changeset: http://git.rtems.org/rtems/commit/?id=3ee7b84394d3747d9b8010006c3e75ac10839abe

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Mar  5 11:47:56 2012 +0100

libblock: New support functions

Add
 o rtems_disk_get_block_size(),
 o rtems_disk_get_block_begin(), and
 o rtems_disk_get_block_count().

---

 cpukit/libblock/include/rtems/diskdevs.h |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/cpukit/libblock/include/rtems/diskdevs.h b/cpukit/libblock/include/rtems/diskdevs.h
index 8884999..8e59f36 100644
--- a/cpukit/libblock/include/rtems/diskdevs.h
+++ b/cpukit/libblock/include/rtems/diskdevs.h
@@ -178,6 +178,27 @@ static inline uint32_t rtems_disk_get_media_block_size(
   return dd->media_block_size;
 }
 
+static inline uint32_t rtems_disk_get_block_size(
+  const rtems_disk_device *dd
+)
+{
+  return dd->block_size;
+}
+
+static inline rtems_blkdev_bnum rtems_disk_get_block_begin(
+  const rtems_disk_device *dd
+)
+{
+  return dd->start;
+}
+
+static inline rtems_blkdev_bnum rtems_disk_get_block_count(
+  const rtems_disk_device *dd
+)
+{
+  return dd->size;
+}
+
 /** @} */
 
 /**




More information about the vc mailing list