Merge "libsparse: Fix odd-sized input files total_blks" am: 652ce94f40

am: ab74c778df

Change-Id: I5bc6a0df02d86fa0f56f866ebdcb18314858634a
This commit is contained in:
Chris Fries 2017-04-19 19:24:26 +00:00 committed by android-build-merger
commit cbd8d9d4f5
1 changed files with 1 additions and 1 deletions

View File

@ -584,7 +584,7 @@ static int output_file_init(struct output_file *out, int block_size,
.file_hdr_sz = SPARSE_HEADER_LEN,
.chunk_hdr_sz = CHUNK_HEADER_LEN,
.blk_sz = out->block_size,
.total_blks = out->len / out->block_size,
.total_blks = DIV_ROUND_UP(out->len, out->block_size),
.total_chunks = chunks,
.image_checksum = 0
};