Frank Pagliughi <fpagliughi@mindspring.com> writes:
So then it's the IDE driver that should scan the partition table on
the physical disk and export separate mount points for each? Would
that be the proper way to go?
No, the generic disk layer already does all of this. It reads the MBR
from the disk, looks for a partition table and sets up its data
structures accordingly.
Take a look in io/disk/current/src/disk.c, specifically the read_mbr()
and read_partition() functions. And the code in disk_lookup() which
selects the right partition.
In the same way that it shouldn't be done at too high a level,
partitioning shouldn't be done at too low a level either. Partitions
can exist on a wide variety of media, not just IDE disks.