diff --git a/source/ff.c b/source/ff.c index a648837fef86de95da21acbdbda7b536a15779a6..cf97f1fb913c1216449e96ed7a311c6003ada8de 100644 --- a/source/ff.c +++ b/source/ff.c @@ -2658,6 +2658,11 @@ BYTE check_fs ( /* 0:FAT, 2:Valid BS but not FAT, 3:Not a BS, 4:Disk error */ if (ld_word(fs->win + BS_55AA) != 0xAA55) return 3; /* Check boot record signature (always here regardless of the sector size) */ + if (!mem_cmp(fs->win + BS_JmpBoot, "\xEB\x76\x90" "EXFAT ", 11)) { /* Check if exFAT VBR */ + PRINTK("exFAT is not supported!\n"); + return 2; + } + if (fs->win[BS_JmpBoot] == 0xE9 || fs->win[BS_JmpBoot] == 0xEB || fs->win[BS_JmpBoot] == 0xE8) { /* Valid JumpBoot code? */ if (!mem_cmp(fs->win + BS_FilSysType, "FAT", 3)) return 0; /* Is it an FAT VBR? */ if (!mem_cmp(fs->win + BS_FilSysType32, "FAT32", 5)) return 0; /* Is it an FAT32 VBR? */