This is the mail archive of the ecos-devel@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Partition support for FAT file system


Nick Garnett wrote:
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.


By the way... The main reason I had trouble with this, is because the one disk test application, fatfs1, doesn't work out of the box. The FAT test uses disks named like "/dev/disk0/" whereas the IDE package defaults to names like "/dev/hda/". Is one naming convention preferred over the other? Should we change the default for one or the other?


- Frank



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]