Re: real_root_dev

From: Andries Brouwer (aeb@veritas.com)
Date: Fri Oct 20 2000 - 07:23:22 EST


On Thu, Oct 19, 2000 at 09:50:48PM +0200, Geert Uytterhoeven wrote:
>
> `real_root_dev' must be `int', not `kdev_t'.
>
> - if (MAJOR(real_root_dev) != RAMDISK_MAJOR
> + if (MAJOR((kdev_t)real_root_dev) != RAMDISK_MAJOR

Ach, Geert, how painful to behold!

Never forget: a kdev_t is a pointer to a structure,
and MAJOR takes a field of this structure.
Casting an integer to a structure is ridiculous.
There are functions to_kdev_t etc to do the conversion
(and these may involve lookup in a hash table).

Please keep the source as much as possible kdev_t clean.
At some point in time, I hope 2.5.1, we must change,
and all such cruft would have to be fixed again.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:16 EST