From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 29 Nov 2016 12:32:20 -0500 Subject: [U-Boot] [U-Boot, 1/2] fs/fat/fatwrite: Local variable as buffer to store dir_slot entries In-Reply-To: <1469686136-30713-1-git-send-email-tfchee@altera.com> References: <1469686136-30713-1-git-send-email-tfchee@altera.com> Message-ID: <20161129173220.GS2546@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Jul 27, 2016 at 11:08:56PM -0700, Tien Fong Chee wrote: > 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 > Signed-off-by: Tien Fong Chee Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: