projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b454ee
)
fs/fat: add fat12 cluster check
author
Wu, Josh
<Josh.wu@atmel.com>
Thu, 8 May 2014 08:14:05 +0000
(16:14 +0800)
committer
Tom Rini
<trini@ti.com>
Mon, 12 May 2014 20:31:50 +0000
(16:31 -0400)
Signed-off-by: Josh Wu <josh.wu@atmel.com>
include/fat.h
patch
|
blob
|
history
diff --git
a/include/fat.h
b/include/fat.h
index c8eb7ccd2904c2e9977b252f4234d20854e29501..65da733aef36aa23132290ab0c61caec69fd6604 100644
(file)
--- 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 */