summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormichael <trimarchi@gandalf.sssup.it>2008-03-02 23:33:46 +0100
committerWolfgang Denk <wd@denx.de>2008-03-03 00:40:42 +0100
commit8ce4e5c2c02cb7e8adddf7b651d3050d81ce4c1d (patch)
tree8941f5d852a1e857e4e953a58fd475624a1e401b /include
parent661bad63a076a96c39c64f136915f146725af92b (diff)
downloadtalos-obmc-uboot-8ce4e5c2c02cb7e8adddf7b651d3050d81ce4c1d.tar.gz
talos-obmc-uboot-8ce4e5c2c02cb7e8adddf7b651d3050d81ce4c1d.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/fat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/fat.h b/include/fat.h
index 92638d535e..f993ccab1c 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -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 */
OpenPOWER on IntegriCloud