cluster_count is compared against FAT16_MAX, which is defined as 0xfff4
That is the maximum number of cluster a FAT16 can have.
For reference also check the hardware whitepaper from Microsoft
FAT: General Overview of On-Disk Format, version 1.03 page 15
Signed-off-by: Thomas Frauendorfer <tf@miray.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
// strcpy(id->type_version, "FAT32");
// goto fat32;
// }
- if (cluster_count >= FAT16_MAX)
+ if (cluster_count > FAT16_MAX)
goto fat32;
/* the label may be an attribute in the root directory */