summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Fries2017-04-19 14:26:27 -0500
committerandroid-build-merger2017-04-19 14:26:27 -0500
commit221af0990bc76ea517e1c0617f5ad07f0e17c267 (patch)
tree7bbb704846583334f783c926f65fea4840cd3be4 /libsparse
parentd1cd087ba5e214636079a1a547fdf1c29822f838 (diff)
parentcbd8d9d4f58a88ff57a4720ef17c7e7be147ea9b (diff)
downloadplatform-system-core-221af0990bc76ea517e1c0617f5ad07f0e17c267.tar.gz
platform-system-core-221af0990bc76ea517e1c0617f5ad07f0e17c267.tar.xz
platform-system-core-221af0990bc76ea517e1c0617f5ad07f0e17c267.zip
Merge "libsparse: Fix odd-sized input files total_blks" am: 652ce94f40 am: ab74c778df
am: cbd8d9d4f5 Change-Id: I3c7afcd7a3a3bab4460123751d0a5696cb1892c6
Diffstat (limited to 'libsparse')
-rw-r--r--libsparse/output_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsparse/output_file.c b/libsparse/output_file.c
index 21159987f..51e60ef79 100644
--- a/libsparse/output_file.c
+++ b/libsparse/output_file.c
@@ -584,7 +584,7 @@ static int output_file_init(struct output_file *out, int block_size,
584 .file_hdr_sz = SPARSE_HEADER_LEN, 584 .file_hdr_sz = SPARSE_HEADER_LEN,
585 .chunk_hdr_sz = CHUNK_HEADER_LEN, 585 .chunk_hdr_sz = CHUNK_HEADER_LEN,
586 .blk_sz = out->block_size, 586 .blk_sz = out->block_size,
587 .total_blks = out->len / out->block_size, 587 .total_blks = DIV_ROUND_UP(out->len, out->block_size),
588 .total_chunks = chunks, 588 .total_chunks = chunks,
589 .image_checksum = 0 589 .image_checksum = 0
590 }; 590 };