| ddf7bcfa | 15-Jul-2014 |
Heiko Schocher <hs@denx.de> |
mtd, ubi, ubifs: update for the sync with linux v3.14
while playing with the new mtd/ubi/ubifs sync, found some small updates for it:
- add del_mtd_partition() to include/linux/mtd/mtd - mtd: add a
mtd, ubi, ubifs: update for the sync with linux v3.14
while playing with the new mtd/ubi/ubifs sync, found some small updates for it:
- add del_mtd_partition() to include/linux/mtd/mtd - mtd: add a debug_printf - remove some not used functions
Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Scott Wood <scottwood@freescale.com> Cc: Tom Rini <trini@ti.com>
show more ...
|
| 862c93e9 | 12-Jul-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
yaffs2: preprocessor cleanup
Current code uses the preprocessor to change an else case to a statement without any if condition at all. Although this works, change the optional code to return early,
yaffs2: preprocessor cleanup
Current code uses the preprocessor to change an else case to a statement without any if condition at all. Although this works, change the optional code to return early, so all optional code is contained within a single #ifdef.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
show more ...
|
| dd6d7967 | 08-May-2014 |
Wu, Josh <Josh.wu@atmel.com> |
fs/fat: correct FAT16/12 file finding in root dir
When write a file into FAT file system, it will search a match file in root dir. So the find_directory_entry() will get the first cluster of root di
fs/fat: correct FAT16/12 file finding in root dir
When write a file into FAT file system, it will search a match file in root dir. So the find_directory_entry() will get the first cluster of root dir content and search the directory item one by one. If the file is not found, we will call get_fatent_value() to get next cluster of root dir via lookup the FAT table and continue the search.
The issue is in FAT16/12 system, we cannot get root dir's next clust from FAT table. The FAT table only be use to find the clust of data aera in FAT16/12.
In FAT16/12 if the clust is in root dir, the clust number is a negative number or 0, 1. Since root dir is located in front of the data area. Data area start clust #2. So the root dir clust number should < 2.
This patch will check above situation before call get_fatenv_value(). If curclust is < 2, include minus number, we just increase one on the curclust since root dir is in continous cluster.
The patch also add a sanity check for entry in get_fatenv_value().
Signed-off-by: Josh Wu <josh.wu@atmel.com>
show more ...
|
| 2e98f708 | 08-May-2014 |
Wu, Josh <Josh.wu@atmel.com> |
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 exam
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>
show more ...
|
| 8b454eee | 06-May-2014 |
Łukasz Majewski <l.majewski@samsung.com> |
fs:ext4:write:fix: Reinitialize global variables after updating a file
This bug shows up when file stored on the ext4 file system is updated.
The ext4fs_delete_file() is responsible for deleting fi
fs:ext4:write:fix: Reinitialize global variables after updating a file
This bug shows up when file stored on the ext4 file system is updated.
The ext4fs_delete_file() is responsible for deleting file's (e.g. uImage) data. However some global data (especially ext4fs_indir2_block), which is used during file deletion are left unchanged.
The ext4fs_indir2_block pointer stores reference to old ext4 double indirect allocated blocks. When it is unchanged, after file deletion, ext4fs_write_file() uses the same pointer (since it is already initialized - i.e. not NULL) to return number of blocks to write. This trunks larger file when previous one was smaller.
Lets consider following scenario:
1. Flash target with ext4 formatted boot.img (which has uImage [*] on itself) 2. Developer wants to upload their custom uImage [**] - When new uImage [**] is smaller than the [*] - everything works correctly - we are able to store the whole smaller file with corrupted ext4fs_indir2_block pointer - When new uImage [**] is larger than the [*] - theCRC is corrupted, since truncation on data stored at eMMC was done. 3. When uImage CRC error appears, then reboot and LTHOR/DFU reflashing causes proper setting of ext4fs_indir2_block() and after that uImage[**] is successfully stored (correct uImage [*] metadata is stored at an eMMC on the first flashing).
Due to above the bug was very difficult to reproduce. This patch sets default values for all ext4fs_indir* pointers/variables.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|