• Wu, Josh's avatar
    fs: fat_write: fix the incorrect last cluster checking · 2e98f708
    Wu, Josh authored
    In fat_write.c, the last clust condition check is incorrect:
    
      if ((curclust >= 0xffffff8) || (curclust >= 0xfff8)) {
      	... ...
      }
    
    For example, in FAT32 if curclust is 0x11000. It is a valid clust.
    But on above condition check, it will be think as a last clust.
    
    So the correct last clust check should be:
      in fat32, curclust >= 0xffffff8
      in fat16, curclust >= 0xfff8
      in fat12, curclust >= 0xff8
    
    This patch correct the last clust check.
    Signed-off-by: default avatarJosh Wu <josh.wu@atmel.com>
    2e98f708
Name
Last commit
Last update
Licenses Loading commit data...
api Loading commit data...
arch Loading commit data...
board Loading commit data...
common Loading commit data...
disk Loading commit data...
doc Loading commit data...
drivers Loading commit data...
dts Loading commit data...
examples Loading commit data...
fs Loading commit data...
include Loading commit data...
lib Loading commit data...
nand_spl Loading commit data...
net Loading commit data...
post Loading commit data...
scripts Loading commit data...
spl Loading commit data...
test Loading commit data...
tools Loading commit data...
.checkpatch.conf Loading commit data...
.gitignore Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
MAKEALL Loading commit data...
Makefile Loading commit data...
README Loading commit data...
boards.cfg Loading commit data...
config.mk Loading commit data...
mkconfig Loading commit data...
snapshot.commit Loading commit data...