From 6615d14af1653ff461cbd054ae1190dfebbe164d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 16 Jan 2004 22:36:52 +0000 Subject: 2004-01-16 Marco Gerards * linux/dev/glue/block.c (device_get_status): Correctly calculate the number of blocks. --- linux/dev/glue/block.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'linux') 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 -- cgit v1.2.3