FatFS R0.14 customization: public.sav detection

This commit is contained in:
d0k3 2019-12-11 00:10:48 +01:00
parent e446bdbfa5
commit 622d0b053c

View File

@ -3305,6 +3305,8 @@ static UINT check_fs ( /* 0:FAT VBR, 1:exFAT VBR, 2:Valid BS but not FAT, 3:Inva
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? */
/* !CUSTOM CODE! - special detection for public.sav archives in the TWLN partition */
if ((ld_dword(fs->win + BS_FilSysType) == 0x00) && (ld_dword(fs->win + BS_VolID) == 0x12345678)) return 0;
}
return 2; /* Valid BS but not FAT */
}