summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Smith <whydoubt@gmail.com>2013-06-15 15:32:05 -0500
committerJeff Smith <whydoubt@gmail.com>2013-06-15 16:03:54 -0500
commitd9a1430ff2b2d2a52b586dfba1db5ac0128dd85b (patch)
tree4a5b497e992593dbce6241d7aace7d23d0113bc2
parent51a2e4d5d44a6f788da207dff301356e16b4e283 (diff)
downloadsystem_core-d9a1430ff2b2d2a52b586dfba1db5ac0128dd85b.zip
system_core-d9a1430ff2b2d2a52b586dfba1db5ac0128dd85b.tar.gz
system_core-d9a1430ff2b2d2a52b586dfba1db5ac0128dd85b.tar.bz2
adb: fix reported transfer size for transfer over 4 GiB
When transferring files over 4 GiB with adb, the size of the transfer is misreported. Change-Id: Ia3d4cae1e9f82b4f7432341820b101ea9a44f85b Signed-off-by: Jeff Smith <whydoubt@gmail.com>
-rw-r--r--adb/file_sync_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/adb/file_sync_client.c b/adb/file_sync_client.c
index 64e393c..354d0fb 100644
--- a/adb/file_sync_client.c
+++ b/adb/file_sync_client.c
@@ -32,7 +32,7 @@
#include "file_sync_service.h"
-static unsigned total_bytes;
+static unsigned long long total_bytes;
static long long start_time;
static long long NOW()
@@ -58,8 +58,8 @@ static void END()
t = 1000000;
fprintf(stderr,"%lld KB/s (%lld bytes in %lld.%03llds)\n",
- ((((long long) total_bytes) * 1000000LL) / t) / 1024LL,
- (long long) total_bytes, (t / 1000000LL), (t % 1000000LL) / 1000LL);
+ ((total_bytes * 1000000LL) / t) / 1024LL,
+ total_bytes, (t / 1000000LL), (t % 1000000LL) / 1000LL);
}
void sync_quit(int fd)