[ECOS] Re: FAT16

Savin Zlobec savin@elatec.si
Tue Sep 30 06:53:00 GMT 2003


Nelu wrote:

>Hi,
>
>	I am trying to use the experimental FAT16 filesystem package for eCos with a 
>MMC card. I've noticed that the function:
>
>static int 
>read_boot_record(fatfs_disk_t *disk, fat_boot_record_t *fbr)
>
>is trying to read the FBR from first block and in my case this fails because 
>the MMC I use has a MBR sector and the FBR starts only at block 32.
>
>    err = cyg_blib_read(&disk->blib, (void*)data, &len, 0, 0);
>
>Do you have any ideas and/or patches on how this could be changed to make use 
>of the MBR info to correctly determine the start of FBR.
>
Offset 0 here means the first block of the device or partition :

/dev/disk0/0 is the device handle - offset 0 means the first block of device
/dev/disk0/[1-4] are partition handles - here offset 0 is the first 
block of the partition

to get the detected partitions info use cyg_io_get_config with 
CYG_IO_GET_CONFIG_DISK_INFO key.
You should have enabled the MBR support for your device with setting the 
mbr_support to true. This
is done when you define DISK_CHANNEL.

And please CC to ecos-discuss.

savin


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list