On Wed, Sep 19, 2012 at 09:23:19AM +0200, Franck Jullien wrote: > 2012/9/19 Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>: > > On Tue, Sep 18, 2012 at 11:51:35PM +0200, 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_or_mbr to check if a buffer is a FAT boot > >> or MBR sector > >> > >> Signed-off-by: Franck Jullien <franck.jullien@xxxxxxxxx> > >> --- > >> common/filetype.c | 63 ++++++++++++++++++++++++++++++++++++++++++---------- > >> include/filetype.h | 2 + > >> 2 files changed, 53 insertions(+), 12 deletions(-) > >> [...] > > I shouldn't write code late at night. Hopefully you are reading my > code with attention :) Don't worry, I think this happens to most of us ;) Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox