summaryrefslogtreecommitdiff
path: root/fs/fs.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-11-24 11:50:46 -0500
committerTom Rini <trini@ti.com>2014-12-01 15:21:57 -0500
commit9e374e7b729dc9f68be89cd3e3b1d4d48c768ecf (patch)
tree159d3795f8fd20087fa4123a26c3e2efdde02121 /fs/fs.c
parente17e998d7fee2e7d381b7bff21aca3714387d5d7 (diff)
downloadu-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 3da78606d1..ddd751c9cc 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -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");