mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
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>
This commit is contained in:
6
fs/fs.c
6
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");
|
||||
|
Reference in New Issue
Block a user