Skip to content
Snippets Groups Projects
Commit 7aa1a6b7 authored by Tien Fong Chee's avatar Tien Fong Chee Committed by Tom Rini
Browse files

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: default avatarGenevieve Chan <ccheauya@altera.com>
Signed-off-by: default avatarTien Fong Chee <tfchee@altera.com>
parent e94793c8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment