[rtems commit] libblock: Fix read request block count calculation
Sebastian Huber
sebh at rtems.org
Thu May 24 15:34:34 UTC 2012
Module: rtems
Branch: master
Commit: 13d3a37d3870e129b9856638ac9a1ead7acdde98
Changeset: http://git.rtems.org/rtems/commit/?id=13d3a37d3870e129b9856638ac9a1ead7acdde98
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu May 24 17:15:05 2012 +0200
libblock: Fix read request block count calculation
---
cpukit/libblock/src/bdbuf.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c
index d97265e..593f19b 100644
--- a/cpukit/libblock/src/bdbuf.c
+++ b/cpukit/libblock/src/bdbuf.c
@@ -1848,7 +1848,7 @@ rtems_bdbuf_create_read_request (const rtems_disk_device *dd,
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_to_media_block_shift >= 0 ?
- dd->block_size >> dd->block_to_media_block_shift
+ 1U << dd->block_to_media_block_shift
: dd->block_size / dd->media_block_size;
uint32_t block_size = dd->block_size;
uint32_t transfer_index = 1;
More information about the vc
mailing list