[rtems commit] libblock: New support functions

Joel Sherrill joel at rtems.org
Thu Mar 29 14:14:30 UTC 2012


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

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