From: Laine Walker-Avina Date: Tue, 13 Apr 2010 20:27:31 +0000 (-0700) Subject: FAT: Find the start of the first partition in a non-hardcoded way X-Git-Tag: v1.5.0~71 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f24393836812798cac755eeaeae37112d709b09d;p=pandora-x-loader.git FAT: Find the start of the first partition in a non-hardcoded way --- diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 0e91556..c6bdb13 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -145,13 +145,11 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no) return -1; } #else - /* FIXME we need to determine the start block of the - * partition where the DOS FS resides. This can be done - * by using the get_partition_info routine. For this - * purpose the libpart must be included. - */ - part_offset=63; - //part_offset=0; + part_offset = buffer[DOS_PART_TBL_OFFSET+8] | + buffer[DOS_PART_TBL_OFFSET+9] <<8 | + buffer[DOS_PART_TBL_OFFSET+10]<<16 | + buffer[DOS_PART_TBL_OFFSET+11]<<24; + cur_part = 1; #endif }