fs: fat: fix link error when building with DEBUG=1
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 25 Feb 2019 18:42:48 +0000 (19:42 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 28 Feb 2019 19:21:46 +0000 (14:21 -0500)
commit7274b7638a3ed03f64faff185253b2bccf557877
tree75fc1f51d754e56efd315d66674c2b063cb60050
parenta319229fdaced1aa74f8d7a0ffa1194f352a5a38
fs: fat: fix link error when building with DEBUG=1

When compiling with DEBUG=1 an error
fs/fat/fat_write.c:831: undefined reference to `__aeabi_ldivmod'
occurred.

We should use do_div() instead of the modulus operator.

filesize and cur_pos cannot be negative. So let's use u64 to avoid
warnings.

Fixes: cb8af8af5ba0 ("fs: fat: support write with non-zero offset")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
fs/fat/fat_write.c