This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
Re: Partition support for FAT file system
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.
--
Nick Garnett eCos Kernel Architect
eCosCentric Limited http://www.eCosCentric.com The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No: 4422071