u-boot/fs/fat
Wu, Josh 2e98f70882 fs: fat_write: fix the incorrect last cluster checking
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: Josh Wu <josh.wu@atmel.com>
2014-05-12 16:31:50 -04:00
..
fat_write.c fs: fat_write: fix the incorrect last cluster checking 2014-05-12 16:31:50 -04:00
fat.c fat: implement exists() for FAT fs 2014-02-19 09:47:34 -05:00
file.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
Makefile fs: convert makefiles to Kbuild style 2013-10-31 13:26:01 -04:00