• 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
..
andestech Loading commit data...
asm-generic Loading commit data...
bedbug Loading commit data...
configs Loading commit data...
cramfs Loading commit data...
dm Loading commit data...
faraday Loading commit data...
galileo Loading commit data...
jffs2 Loading commit data...
linux Loading commit data...
lzma Loading commit data...
mtd Loading commit data...
pcmcia Loading commit data...
power Loading commit data...
samsung Loading commit data...
synopsys Loading commit data...
u-boot Loading commit data...
usb Loading commit data...
zfs Loading commit data...
.gitignore Loading commit data...
74xx_7xx.h Loading commit data...
ACEX1K.h Loading commit data...
MCD_dma.h Loading commit data...
MCD_progCheck.h Loading commit data...
MCD_tasksInit.h Loading commit data...
SA-1100.h Loading commit data...
_exports.h Loading commit data...
addr_map.h Loading commit data...
aes.h Loading commit data...
ahci.h Loading commit data...
ali512x.h Loading commit data...
altera.h Loading commit data...
ambapp.h Loading commit data...
ansi.h Loading commit data...
api_public.h Loading commit data...
armcoremodule.h Loading commit data...
asm-offsets.h Loading commit data...
ata.h Loading commit data...
atmel_hlcdc.h Loading commit data...
atmel_lcdc.h Loading commit data...
atmel_mci.h Loading commit data...
bcd.h Loading commit data...
bitfield.h Loading commit data...
bmp_layout.h Loading commit data...
bootcount.h Loading commit data...
bootstage.h Loading commit data...
bouncebuf.h Loading commit data...
bus_vcxk.h Loading commit data...
bzlib.h Loading commit data...
cbfs.h Loading commit data...
circbuf.h Loading commit data...
clk.h Loading commit data...
cmd_spl.h Loading commit data...
command.h Loading commit data...
common.h Loading commit data...
common_timing_params.h Loading commit data...
commproc.h Loading commit data...
compiler.h Loading commit data...
config_cmd_all.h Loading commit data...
config_cmd_default.h Loading commit data...
config_cmd_defaults.h Loading commit data...
config_defaults.h Loading commit data...
config_distro_defaults.h Loading commit data...
config_fallbacks.h Loading commit data...
config_phylib_all_drivers.h Loading commit data...
config_uncmd_spl.h Loading commit data...
cpsw.h Loading commit data...
crc.h Loading commit data...
cros_ec.h Loading commit data...
cros_ec_message.h Loading commit data...
dataflash.h Loading commit data...
ddr_spd.h Loading commit data...
dfu.h Loading commit data...
dialog_pmic.h Loading commit data...
div64.h Loading commit data...
dm-demo.h Loading commit data...
dm.h Loading commit data...
dm9000.h Loading commit data...
dp83848.h Loading commit data...
ds1722.h Loading commit data...
ds4510.h Loading commit data...
dtt.h Loading commit data...
dwmmc.h Loading commit data...
e500.h Loading commit data...
ec_commands.h Loading commit data...
edid.h Loading commit data...
elf.h Loading commit data...
env_attr.h Loading commit data...
env_callback.h Loading commit data...
env_default.h Loading commit data...
env_flags.h Loading commit data...
environment.h Loading commit data...
errno.h Loading commit data...
exports.h Loading commit data...
ext4fs.h Loading commit data...
ext_common.h Loading commit data...
fat.h Loading commit data...
fdt.h Loading commit data...
fdt_support.h Loading commit data...
fdtdec.h Loading commit data...
fis.h Loading commit data...
flash.h Loading commit data...
fm_eth.h Loading commit data...
fpga.h Loading commit data...
fs.h Loading commit data...
fsl_ddr.h Loading commit data...
fsl_ddr_dimm_params.h Loading commit data...
fsl_ddr_sdram.h Loading commit data...
fsl_ddrc_version.h Loading commit data...
fsl_diu_fb.h Loading commit data...
fsl_esdhc.h Loading commit data...
fsl_ifc.h Loading commit data...
fsl_immap.h Loading commit data...
fsl_mdio.h Loading commit data...
fsl_pmic.h Loading commit data...
fsl_usb.h Loading commit data...
fuse.h Loading commit data...
g_dnl.h Loading commit data...
gdsys_fpga.h Loading commit data...
gt64120.h Loading commit data...
hash.h Loading commit data...
hush.h Loading commit data...
hw_sha.h Loading commit data...
hwconfig.h Loading commit data...
i2c.h Loading commit data...
i2s.h Loading commit data...
i8042.h Loading commit data...
ide.h Loading commit data...
image.h Loading commit data...
initcall.h Loading commit data...
input.h Loading commit data...
iomux.h Loading commit data...
ioports.h Loading commit data...
ipu_pixfmt.h Loading commit data...
key_matrix.h Loading commit data...
keyboard.h Loading commit data...
kgdb.h Loading commit data...
lattice.h Loading commit data...
lcd.h Loading commit data...
lcdvideo.h Loading commit data...
ld9040.h Loading commit data...
led-display.h Loading commit data...
libata.h Loading commit data...
libfdt.h Loading commit data...
libfdt_env.h Loading commit data...
libtizen.h Loading commit data...
linker_lists.h Loading commit data...
linux_logo.h Loading commit data...
lmb.h Loading commit data...
logbuff.h Loading commit data...
lxt971a.h Loading commit data...
lynxkdi.h Loading commit data...
malloc.h Loading commit data...
mb862xx.h Loading commit data...
mc13783.h Loading commit data...
mc13892.h Loading commit data...
mc34704.h Loading commit data...
mc9sdz60.h Loading commit data...
menu.h Loading commit data...
micrel.h Loading commit data...
mii_phy.h Loading commit data...
miiphy.h Loading commit data...
mk48t59.h Loading commit data...
mmc.h Loading commit data...
mpc106.h Loading commit data...
mpc5xx.h Loading commit data...
mpc5xxx.h Loading commit data...
mpc5xxx_sdma.h Loading commit data...
mpc824x.h Loading commit data...
mpc8260.h Loading commit data...
mpc8260_irq.h Loading commit data...
mpc83xx.h Loading commit data...
mpc85xx.h Loading commit data...
mpc86xx.h Loading commit data...
mpc8xx.h Loading commit data...
mpc8xx_irq.h Loading commit data...
msc01.h Loading commit data...
mtd_node.h Loading commit data...
mv88e6352.h Loading commit data...
mvmfp.h Loading commit data...
nand.h Loading commit data...
net.h Loading commit data...
netdev.h Loading commit data...
nios2-epcs.h Loading commit data...
nios2-io.h Loading commit data...
nios2-yanu.h Loading commit data...
nios2.h Loading commit data...
nomadik.h Loading commit data...
ns16550.h Loading commit data...
ns87308.h Loading commit data...
onenand_uboot.h Loading commit data...
os.h Loading commit data...
palmas.h Loading commit data...
part.h Loading commit data...
part_efi.h Loading commit data...
pc_keyb.h Loading commit data...
pca953x.h Loading commit data...
pca9564.h Loading commit data...
pca9698.h Loading commit data...
pci.h Loading commit data...
pci_gt64120.h Loading commit data...
pci_ids.h Loading commit data...
pci_msc01.h Loading commit data...
pcmcia.h Loading commit data...
phy.h Loading commit data...
physmem.h Loading commit data...
post.h Loading commit data...
ppc_asm.tmpl Loading commit data...
ppc_defs.h Loading commit data...
ps2mult.h Loading commit data...
pwm.h Loading commit data...
radeon.h Loading commit data...
reiserfs.h Loading commit data...
rsa-checksum.h Loading commit data...
rsa.h Loading commit data...
rtc.h Loading commit data...
s6e63d6.h Loading commit data...
s_record.h Loading commit data...
sandboxblockdev.h Loading commit data...
sandboxfs.h Loading commit data...
sata.h Loading commit data...
scf0403_lcd.h Loading commit data...
scsi.h Loading commit data...
sdhci.h Loading commit data...
search.h Loading commit data...
sed13806.h Loading commit data...
sed156x.h Loading commit data...
serial.h Loading commit data...
sh_pfc.h Loading commit data...
sh_tmu.h Loading commit data...
sha1.h Loading commit data...
sha256.h Loading commit data...
sja1000.h Loading commit data...
slre.h Loading commit data...
sm501.h Loading commit data...
sound.h Loading commit data...
spartan2.h Loading commit data...
spartan3.h Loading commit data...
spd.h Loading commit data...
spd_sdram.h Loading commit data...
spi.h Loading commit data...
spi_flash.h Loading commit data...
spl.h Loading commit data...
splash.h Loading commit data...
status_led.h Loading commit data...
stdio_dev.h Loading commit data...
stratixII.h Loading commit data...
sx151x.h Loading commit data...
sym53c8xx.h Loading commit data...
systemace.h Loading commit data...
tca642x.h Loading commit data...
tegra-kbc.h Loading commit data...
thor.h Loading commit data...
timestamp.h Loading commit data...
tis.h Loading commit data...
tmu.h Loading commit data...
tpm.h Loading commit data...
tps6586x.h Loading commit data...
trace.h Loading commit data...
tsec.h Loading commit data...
tsi108.h Loading commit data...
tsi148.h Loading commit data...
twl4030.h Loading commit data...
twl6030.h Loading commit data...
tws.h Loading commit data...
ubi_uboot.h Loading commit data...
universe.h Loading commit data...
usb.h Loading commit data...
usb_cdc_acm.h Loading commit data...
usb_defs.h Loading commit data...
usb_ether.h Loading commit data...
usb_mass_storage.h Loading commit data...
usbdescriptors.h Loading commit data...
usbdevice.h Loading commit data...
usbroothubdes.h Loading commit data...
uuid.h Loading commit data...
version.h Loading commit data...
video.h Loading commit data...
video_ad7176.h Loading commit data...
video_ad7177.h Loading commit data...
video_ad7179.h Loading commit data...
video_easylogo.h Loading commit data...
video_fb.h Loading commit data...
video_font.h Loading commit data...
video_font_4x6.h Loading commit data...
video_font_data.h Loading commit data...
video_logo.h Loading commit data...
virtex2.h Loading commit data...
vsc7385.h Loading commit data...
vsprintf.h Loading commit data...
vxworks.h Loading commit data...
w83c553f.h Loading commit data...
watchdog.h Loading commit data...
xilinx.h Loading commit data...
xyzModem.h Loading commit data...
zfs_common.h Loading commit data...
zynqpl.h Loading commit data...