Messages in this thread | | | Date | Fri, 20 Oct 2000 14:23:22 +0200 | From | Andries Brouwer <> | Subject | Re: real_root_dev |
| |
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/
| |