diff mbox

[U-Boot,1/3] fs/fat: add fat12 cluster check

Message ID 1399536847-21719-2-git-send-email-josh.wu@atmel.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Josh Wu May 8, 2014, 8:14 a.m. UTC
Signed-off-by: Josh Wu <josh.wu@atmel.com>
---
 include/fat.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Tom Rini May 13, 2014, 1:54 a.m. UTC | #1
On Thu, May 08, 2014 at 04:14:05PM +0800, Wu, Josh wrote:

> Signed-off-by: Josh Wu <josh.wu@atmel.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

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 */