u-boot/fs/fat
Łukasz Majewski 0a04ed86cf FIX: fat: Provide correct return code from disk_{read|write} to upper layers
It is very common that FAT code is using following pattern:
if (disk_{read|write}() < 0)
        return -1;

Up till now the above code was dead, since disk_{read|write) could only
return value >= 0.
As a result some errors from medium layer (i.e. eMMC/SD) were not caught.

The above behavior was caused by block_{read|write|erase} declared at
struct block_dev_desc (@part.h). It returns unsigned long, where 0
indicates error and > 0 indicates that medium operation was correct.

This patch as error regards 0 returned from block_{read|write|erase}
when nr_blocks is grater than zero. Read/Write operation with nr_blocks=0
should return 0 and hence is not considered as an error.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: Odroid XU3 - Exynos 5433
2015-09-11 17:15:21 -04:00
..
fat.c FIX: fat: Provide correct return code from disk_{read|write} to upper layers 2015-09-11 17:15:21 -04:00
fat_write.c FIX: fat: Provide correct return code from disk_{read|write} to upper layers 2015-09-11 17:15:21 -04:00
file.c fat: Prepare API change for files greater than 2GB 2014-11-23 06:49:04 -05:00
Kconfig kconfig: add blank Kconfig files 2014-09-24 18:30:28 -04:00
Makefile fs: convert makefiles to Kbuild style 2013-10-31 13:26:01 -04:00