diff options
author | Roland McGrath <roland@gnu.org> | 2004-01-16 22:36:52 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:15:24 +0200 |
commit | 6615d14af1653ff461cbd054ae1190dfebbe164d (patch) | |
tree | fe4ffa3cb69678cf12960f68d8c26d43bd292dff /linux/dev | |
parent | 178f859cd341fa3da48f2a861bd549e229e75dde (diff) |
2004-01-16 Marco Gerards <metgerards@student.han.nl>
* linux/dev/glue/block.c (device_get_status): Correctly calculate
the number of blocks.
Diffstat (limited to 'linux/dev')
-rw-r--r-- | linux/dev/glue/block.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c index 79e0209..facef51 100644 --- a/linux/dev/glue/block.c +++ b/linux/dev/glue/block.c @@ -1654,8 +1654,9 @@ device_get_status (void *d, dev_flavor_t flavor, dev_status_t status, else { assert (blk_size[MAJOR (bd->dev)]); - (status[DEV_GET_RECORDS_DEVICE_RECORDS] - = blk_size[MAJOR (bd->dev)][MINOR (bd->dev)]); + status[DEV_GET_RECORDS_DEVICE_RECORDS] + = (blk_size[MAJOR (bd->dev)][MINOR (bd->dev)] + << (BLOCK_SIZE_BITS - 9)); } /* It would be nice to return the block size as reported by the driver, but a lot of user level code assumes the sector |