* [U-Boot] [PATCH 1/3] Support for devices with FAT32 PBR @ 2010-05-10 10:14 Igor Luri 2010-05-10 10:14 ` [U-Boot] [PATCH 2/3] " Igor Luri 2010-05-10 10:47 ` [U-Boot] [PATCH 1/3] " Sergei Shtylyov 0 siblings, 2 replies; 4+ messages in thread From: Igor Luri @ 2010-05-10 10:14 UTC (permalink / raw) To: u-boot Signed-off-by: Igor Luri <iluri@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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 2/3] Support for devices with FAT32 PBR 2010-05-10 10:14 [U-Boot] [PATCH 1/3] Support for devices with FAT32 PBR Igor Luri @ 2010-05-10 10:14 ` Igor Luri 2010-05-10 10:14 ` [U-Boot] [PATCH 3/3] " Igor Luri 2010-05-10 10:47 ` [U-Boot] [PATCH 1/3] " Sergei Shtylyov 1 sibling, 1 reply; 4+ messages in thread From: Igor Luri @ 2010-05-10 10:14 UTC (permalink / raw) To: u-boot Signed-off-by: Igor Luri <iluri@aotek.es> --- 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 3/3] Support for devices with FAT32 PBR 2010-05-10 10:14 ` [U-Boot] [PATCH 2/3] " Igor Luri @ 2010-05-10 10:14 ` Igor Luri 0 siblings, 0 replies; 4+ messages in thread From: Igor Luri @ 2010-05-10 10:14 UTC (permalink / raw) To: u-boot Signed-off-by: Igor Luri <iluri@aotek.es> --- fs/fat/fat.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 2445f1e..4da4351 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -50,6 +50,7 @@ static int cur_part = 1; #define DOS_PART_TBL_OFFSET 0x1be #define DOS_PART_MAGIC_OFFSET 0x1fe #define DOS_FS_TYPE_OFFSET 0x36 +#define DOS_FS_FAT32_TYPE_OFFSET 0x52 int disk_read (__u32 startblock, __u32 getsize, __u8 * bufptr) { @@ -94,7 +95,8 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no) if (!get_partition_info (dev_desc, part_no, &info)) { part_offset = info.start; cur_part = part_no; - } else if (!strncmp((char *)&buffer[DOS_FS_TYPE_OFFSET], "FAT", 3)) { + } else if (!strncmp((char *)&buffer[DOS_FS_TYPE_OFFSET], "FAT", 3) || + !strncmp((char *)&buffer[DOS_FS_FAT32_TYPE_OFFSET], "FAT32", 5)) { /* ok, we assume we are on a PBR only */ cur_part = 1; part_offset = 0; @@ -105,7 +107,8 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no) } #else - if (!strncmp((char *)&buffer[DOS_FS_TYPE_OFFSET],"FAT",3)) { + if (!strncmp((char *)&buffer[DOS_FS_TYPE_OFFSET],"FAT",3) || + !strncmp((char *)&buffer[DOS_FS_FAT32_TYPE_OFFSET], "FAT32", 5) ) { /* ok, we assume we are on a PBR only */ cur_part = 1; part_offset = 0; -- 1.5.4.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 1/3] Support for devices with FAT32 PBR 2010-05-10 10:14 [U-Boot] [PATCH 1/3] Support for devices with FAT32 PBR Igor Luri 2010-05-10 10:14 ` [U-Boot] [PATCH 2/3] " Igor Luri @ 2010-05-10 10:47 ` Sergei Shtylyov 1 sibling, 0 replies; 4+ messages in thread From: Sergei Shtylyov @ 2010-05-10 10:47 UTC (permalink / raw) To: u-boot Hello. Igor Luri wrote: > Signed-off-by: Igor Luri <iluri@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) ) > You #define DOS_PBR_FAT32_FSTYPE_OFFSET only in patch 2. That way, patch 1 is uncompilable. Merge the patches please. WBR, Sergei ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-10 10:47 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-10 10:14 [U-Boot] [PATCH 1/3] Support for devices with FAT32 PBR Igor Luri 2010-05-10 10:14 ` [U-Boot] [PATCH 2/3] " Igor Luri 2010-05-10 10:14 ` [U-Boot] [PATCH 3/3] " Igor Luri 2010-05-10 10:47 ` [U-Boot] [PATCH 1/3] " Sergei Shtylyov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox