[U-Boot] [PATCH v2 1/2] Support for devices with FAT32 PBR
Igor Luri
iluri at aotek.es
Mon May 10 13:35:33 CEST 2010
Signed-off-by: Igor Luri <iluri at aotek.es>
---
disk/part_dos.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 887b75e..d91f773 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -77,7 +77,8 @@ static int test_block_type(unsigned char *buffer)
(buffer[DOS_PART_MAGIC_OFFSET + 1] != 0xaa) ) {
return (-1);
} /* no DOS Signature at all */
- if(strncmp((char *)&buffer[DOS_PBR_FSTYPE_OFFSET],"FAT",3)==0)
+ if((strncmp((char *)&buffer[DOS_PBR_FSTYPE_OFFSET],"FAT",3)==0) ||
+ (strncmp((char *)&buffer[DOS_PBR_FAT32_FSTYPE_OFFSET],"FAT32",5)==0) )
return DOS_PBR; /* is PBR */
return DOS_MBR; /* Is MBR */
}
--
1.5.4.3
---
disk/part_dos.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/disk/part_dos.h b/disk/part_dos.h
index ac93f20..6383c58 100644
--- a/disk/part_dos.h
+++ b/disk/part_dos.h
@@ -35,6 +35,7 @@
#define DOS_PART_TBL_OFFSET 0x1be
#define DOS_PART_MAGIC_OFFSET 0x1fe
#define DOS_PBR_FSTYPE_OFFSET 0x36
+#define DOS_PBR_FAT32_FSTYPE_OFFSET 0x52
#define DOS_PBR_MEDIA_TYPE_OFFSET 0x15
#define DOS_MBR 0
#define DOS_PBR 1
--
1.5.4.3
More information about the U-Boot
mailing list