diff options
author | Josh Gao <jmgao@google.com> | 2016-01-19 14:50:18 -0800 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2016-01-19 14:50:18 -0800 |
commit | 9da9ac5b2a109fa61826bc2609011ea84f175c28 (patch) | |
tree | 13bc54f0cb15ef78638dc90450fd77a09d68cdaa /fastboot/engine.cpp | |
parent | cb73db7cd869277212bc72b78f9e68c04c9f4c09 (diff) |
fastboot: show progress when sending sparse images.
Bug: http://b/25443220
Change-Id: Ica0c88aea2a0661f39ff1415ebba464c037651da
Diffstat (limited to 'fastboot/engine.cpp')
-rw-r--r-- | fastboot/engine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fastboot/engine.cpp b/fastboot/engine.cpp index ac5a17a06..47567c041 100644 --- a/fastboot/engine.cpp +++ b/fastboot/engine.cpp @@ -157,17 +157,17 @@ void fb_queue_flash(const char *ptn, void *data, unsigned sz) a->msg = mkmsg("writing '%s'", ptn); } -void fb_queue_flash_sparse(const char *ptn, struct sparse_file *s, unsigned sz) -{ +void fb_queue_flash_sparse(const char* ptn, struct sparse_file* s, unsigned sz, size_t current, + size_t total) { Action *a; a = queue_action(OP_DOWNLOAD_SPARSE, ""); a->data = s; a->size = 0; - a->msg = mkmsg("sending sparse '%s' (%d KB)", ptn, sz / 1024); + a->msg = mkmsg("sending sparse '%s' %zu/%zu (%d KB)", ptn, current, total, sz / 1024); a = queue_action(OP_COMMAND, "flash:%s", ptn); - a->msg = mkmsg("writing '%s'", ptn); + a->msg = mkmsg("writing '%s' %zu/%zu", ptn, current, total); } static int match(const char* str, const char** value, unsigned count) { |