]> git.baikalelectronics.ru Git - uboot.git/commit
fs/fat/fatwrite: Local variable as buffer to store dir_slot entries
authorTien Fong Chee <tfchee@altera.com>
Thu, 28 Jul 2016 06:08:56 +0000 (23:08 -0700)
committerTom Rini <trini@konsulko.com>
Tue, 29 Nov 2016 01:09:45 +0000 (20:09 -0500)
commit0061b594e655ed2170364277cfce36386d90c85a
treeb47cc2339c644563f59ffb2474c6b6105af76cbe
parenta008f5ae9c35a2581389644dea9cac5edce66046
fs/fat/fatwrite: Local variable as buffer to store dir_slot entries

fill_dir_slot use get_contents_vfatname_block as a temporary buffer for
constructing a list of dir_slot entries. To save the memory and providing
correct type of memory for above usage, a local buffer with accurate size
declaration is introduced.

The local array size 640 is used because for long file name entry,
each entry use 32 bytes, one entry can store up to 13 characters.
The maximum number of entry possible is 20. So, total size is
32*20=640bytes.

Signed-off-by: Genevieve Chan <ccheauya@altera.com>
Signed-off-by: Tien Fong Chee <tfchee@altera.com>
fs/fat/fat_write.c
include/fat.h