[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linux gluecode fix for GNUMach 1.x

From: Marco Gerards
Subject: Linux gluecode fix for GNUMach 1.x
Date: 16 Jan 2004 21:59:24 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3


There is a small bug in the block device gluecode that prevents the
floppy driver for working.  Before applying this patch storeinfo
reported that the floppy has 1440 blocks, this is not true, it has
2880 blocks.

The problem is that the blk_size array holds the amount of 1024 bytes
sized blocks while the device_get_status function returns the amount
of 512 bytes sized blocks.

After this patch is checked in I will close bug #1883 on savannah.

Perhaps I will have a look at the serial drive bug if this is not too
hard to fix.  Is there anything I should know about this bug and how
to fix it?


2004-01-16  Marco Gerards  <metgerards@student.han.nl>

        * linux/dev/glue/block.c (device_get_status): Correctly calculate
        the amount of blocks.

diff -upr ../gnumach.old/linux/dev/glue/block.c ./linux/dev/glue/block.c
--- ../gnumach.old/linux/dev/glue/block.c       2001-06-14 07:10:36.000000000 
+++ ./linux/dev/glue/block.c    2004-01-16 20:59:25.000000000 +0100
@@ -1655,7 +1655,8 @@ device_get_status (void *d, dev_flavor_t
          assert (blk_size[MAJOR (bd->dev)]);
-          = blk_size[MAJOR (bd->dev)][MINOR (bd->dev)]);
+          = 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]