--- a/detect.c +++ b/detect.c @@ -47,6 +47,7 @@ void detect_dos_partmap(SECTION *section, int level); void detect_gpt_partmap(SECTION *section, int level); void detect_fat(SECTION *section, int level); +void detect_exfat(SECTION *section, int level); void detect_ntfs(SECTION *section, int level); void detect_hpfs(SECTION *section, int level); void detect_dos_loader(SECTION *section, int level); @@ -131,6 +132,7 @@ detect_amiga_fs, detect_apple_volume, detect_fat, + detect_exfat, detect_ntfs, detect_hpfs, detect_udf, --- a/dos.c +++ b/dos.c @@ -429,6 +429,8 @@ /* since the above is also present on NTFS, make sure it's not NTFS... */ if (memcmp(buf + 3, "NTFS ", 8) == 0) return; + if (memcmp(buf + 3, "EXFAT ", 8) == 0) + return; /* next, some soft tests, taking score */ score = 0; @@ -516,6 +518,25 @@ } /* + * exFAT file system + */ + +void detect_exfat(SECTION *section, int level) +{ + unsigned char *buf; + + if (get_buffer(section, 0, 512, (void **)&buf) < 512) + return; + + /* check signatures */ + if (memcmp(buf + 3, "EXFAT ", 8) != 0) + return; + + /* tell the user */ + print_line(level, "exFAT file system"); +} + +/* * NTFS file system */