Fix checking fat32 cluster size.
This fixes the cluster size tests in the FAT32 file system. The current implementation of VFAT support doesn't work if the referred cluster has an offset > 16bit representation, causing "fatload" and "fatls" commands etc. to fail. Signed-off-by: michael trimarchi <trimarchi@gandalf.sssup.it>
This commit is contained in:
@@ -111,7 +111,8 @@
|
||||
#define START(dent) (FAT2CPU16((dent)->start) \
|
||||
+ (mydata->fatsize != 32 ? 0 : \
|
||||
(FAT2CPU16((dent)->starthi) << 16)))
|
||||
|
||||
#define CHECK_CLUST(x, fatsize) ((x) <= 1 || \
|
||||
(x) >= ((fatsize) != 32 ? 0xfff0 : 0xffffff0))
|
||||
|
||||
typedef struct boot_sector {
|
||||
__u8 ignored[3]; /* Bootstrap code */
|
||||
|
||||
Reference in New Issue
Block a user