]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
fs: fat: Fix mkcksum() function parameters
authorMarek Vasut <marex@denx.de>
Tue, 9 Oct 2012 07:20:22 +0000 (07:20 +0000)
committerTom Rini <trini@ti.com>
Wed, 17 Oct 2012 14:59:11 +0000 (07:59 -0700)
commitff04f6d1224d8952b566b8671222151495883073
tree4e051700ef3ed9e26ef23496e63a2b46b1581e46
parente2e9b37898c4d9f7330ce256d95a37da5064e0cf
fs: fat: Fix mkcksum() function parameters

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 <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
fs/fat/fat.c
fs/fat/fat_write.c