From 6b70265a5d5cc423298f5573db0e515b95c0cad6 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Tue, 13 Sep 2016 12:58:19 +0100 Subject: [PATCH] Adds support for FAT+, closes #14 --- DiscImageChef.Filesystems/FAT.cs | 13 +++++++++++-- README.md | 2 +- TODO | 1 - 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/DiscImageChef.Filesystems/FAT.cs b/DiscImageChef.Filesystems/FAT.cs index de14ea471..75591da8d 100644 --- a/DiscImageChef.Filesystems/FAT.cs +++ b/DiscImageChef.Filesystems/FAT.cs @@ -215,8 +215,17 @@ namespace DiscImageChef.Filesystems // Let's start the fun if(fat32_signature == "FAT32 ") { - sb.AppendLine("Microsoft FAT32"); // Seems easy, check reading - xmlFSType.Type = "FAT32"; + // TODO: Check with a real FAT+ to see where the version is set + if(bpb_sector[0x2A] == 1 || (bpb_sector[0x2B] == 1) + { + sb.AppendLine("FAT+"); // Seems easy, check reading + xmlFSType.Type = "FAT+"; + } + else + { + sb.AppendLine("Microsoft FAT32"); // Seems easy, check reading + xmlFSType.Type = "FAT32"; + } isFAT32 = true; } else if((first_fat_entry & 0xFFFFFFF0) == 0xFFFFFFF0) // Seems to be FAT16 diff --git a/README.md b/README.md index b1d847e34..58e350f9d 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ Supported file systems for identification and information only * Linux extended file system 4 * Microsoft 12-bit File Allocation Table (FAT12), including Atari ST extensions * Microsoft 16-bit File Allocation Table (FAT16) -* Microsoft 32-bit File Allocation Table (FAT32) +* Microsoft 32-bit File Allocation Table (FAT32), including FAT+ extension * BSD Fast File System (FFS) / Unix File System (UFS) * BSD Unix File System 2 (UFS2) * Microsoft/IBM High Performance File System (HPFS) diff --git a/TODO b/TODO index a5ec4423b..03e011f45 100644 --- a/TODO +++ b/TODO @@ -21,7 +21,6 @@ Filesystem plugins: --- Add support for NwFS --- Add support for Squashfs --- Add support for X-Box filesystems ---- Add support for FAT+ --- Add support for ReFS --- Add support for ECMA-67