[PATCH 1/2] [v2] filetype: Improve FAT detection

Franck Jullien franck.jullien at gmail.com
Mon Sep 17 02:08:45 EDT 2012


2012/9/17 Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>:
> On 22:33 Sun 16 Sep     , Franck Jullien wrote:
>> We may have some disk with MBR as a first sector. In this case, the
>> current FAT check returns an error. However, the FAT sector exist and
>> the MBR can tell us where it is.
>>
>> This patch add to file_name_detect_type function the ability to find
>> the FAT boot sector on the first sector of the first partition in case
>> it is not on sector 0.
>>
>> It also introduce is_fat_boot_sector to check if a buffer is a FAT boot
>> sector.
> can you try
>
> mount /dev/disk0.0 /mnt
>
> does this work?
>
> Best Regards,
> J.

Yes it works. However, I don't have partitions, I use mount /dev/disk0 /mnt.
I tested with MBR and FAT as first sector (two different cards) and
with/without -t fat option.

Franck.



More information about the barebox mailing list