From: Tom Rini Date: Tue, 9 Oct 2012 09:45:37 -0700 Subject: [U-Boot] [PATCH] fs: fat: Fix mkcksum() function parameters In-Reply-To: <1348966149-15658-1-git-send-email-marex@denx.de> References: <1348966149-15658-1-git-send-email-marex@denx.de> Message-ID: <20121009164537.GC31472@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 Sun, Sep 30, 2012 at 02:49:09AM +0200, Marek Vasut wrote: > The mkcksum() function now takes one parameter, the pointer to > 11-byte wide character array, which it then operates on. > > Currently, the function is wrongly passed (dir_entry)->name, which > is only 8-byte wide character array. Though by further inspecting > the dir_entry structure, it can be noticed that the name[8] entry > is immediatelly followed by ext[3] entry. Thus, name[8] and ext[3] > in the dir_entry structure actually work as this 11-byte wide array > since they're placed right next to each other by current compiler > behavior. > > Depending on this is obviously wrong, thus fix this by correctly > passing both (dir_entry)->name and (dir_entry)->ext to the mkcksum() > function and adjust the function appropriately. > > Signed-off-by: Marek Vasut > Cc: Tom Rini Building on current next: Configuring for trats board... fat_write.c:338:29: error: request for member 'name' in something not a structure or union fat_write.c:338:45: error: request for member 'ext' in something not a structure or union Please fix and submit a v2, thanks. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: