summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWu, Josh <Josh.wu@atmel.com>2014-05-08 16:14:05 +0800
committerTom Rini <trini@ti.com>2014-05-12 16:31:50 -0400
commit06118973ede291df8617c4089972cbf888bdc96b (patch)
tree282d11bdf858e0bb9fecbd48d5be0ac9cdde2fb9 /include
parent8b454eeeea0ba021ee27f3e103daf1f8fa87bd16 (diff)
downloadu-boot-imx-06118973ede291df8617c4089972cbf888bdc96b.zip
u-boot-imx-06118973ede291df8617c4089972cbf888bdc96b.tar.gz
u-boot-imx-06118973ede291df8617c4089972cbf888bdc96b.tar.bz2
fs/fat: add fat12 cluster check
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Diffstat (limited to 'include')
-rw-r--r--include/fat.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/fat.h b/include/fat.h
index c8eb7cc..65da733 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -85,7 +85,9 @@
+ (mydata->fatsize != 32 ? 0 : \
(FAT2CPU16((dent)->starthi) << 16)))
#define CHECK_CLUST(x, fatsize) ((x) <= 1 || \
- (x) >= ((fatsize) != 32 ? 0xfff0 : 0xffffff0))
+ (x) >= ((fatsize) != 32 ? \
+ ((fatsize) != 16 ? 0xff0 : 0xfff0) : \
+ 0xffffff0))
typedef struct boot_sector {
__u8 ignored[3]; /* Bootstrap code */