diff options
author | Tom Rini <trini@ti.com> | 2014-11-24 11:50:46 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-12-01 15:21:57 -0500 |
commit | 9e374e7b729dc9f68be89cd3e3b1d4d48c768ecf (patch) | |
tree | 159d3795f8fd20087fa4123a26c3e2efdde02121 /fs/fs.c | |
parent | e17e998d7fee2e7d381b7bff21aca3714387d5d7 (diff) | |
download | u-boot-9e374e7b729dc9f68be89cd3e3b1d4d48c768ecf.tar.gz |
fs/ext4/ext4fs.c, fs/fs.c fs/fat/fat_write.c: Adjust 64bit math methods
The changes to introduce loff_t into filesize means that we need to do
64bit math on 32bit platforms. Make sure we use the right wrappers for
these operations.
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Suriyan Ramasami <suriyan.r@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@ti.com>
Tested-by: Pierre Aubert <p.aubert@staubli.com>
Diffstat (limited to 'fs/fs.c')
-rw-r--r-- | fs/fs.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -23,6 +23,8 @@ #include <fs.h> #include <sandboxfs.h> #include <asm/io.h> +#include <div64.h> +#include <linux/math64.h> DECLARE_GLOBAL_DATA_PTR; @@ -399,7 +401,7 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], printf("%llu bytes read in %lu ms", len_read, time); if (time > 0) { puts(" ("); - print_size(len_read / time * 1000, "/s"); + print_size(div_u64(len_read, time) * 1000, "/s"); puts(")"); } puts("\n"); @@ -469,7 +471,7 @@ int do_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], printf("%llu bytes written in %lu ms", len, time); if (time > 0) { puts(" ("); - print_size(len / time * 1000, "/s"); + print_size(div_u64(len, time) * 1000, "/s"); puts(")"); } puts("\n"); |