libf2fs: Track AOSP libsparse API change.
authorTao Bao <tbao@google.com>
Thu, 26 Apr 2018 07:40:09 +0000 (00:40 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 30 Apr 2018 20:34:09 +0000 (13:34 -0700)
commitd9853557a25bcf5340c978ea95f2bbb9da18879c
tree222f05a21abfa70bf15ef0ea5ab49f3e579230c6
parent3bea8984674c4093d157919d7635296e1003fad9
libf2fs: Track AOSP libsparse API change.

The libsparse in AOSP is updating the type for 'len', from 'int' to
'size_t', in the callback parameter of sparse_file_foreach_chunk(). The
value represents a chunk size, which could be legitimately larger than
INT_MAX. This patch tracks the libsparse API change.

The change is guarded with SPARSE_CALLBACK_USES_SIZE_T that's exposed as
part of the libsparse change. This allows f2fs-tools to keep working
against older libsparse versions.

Signed-off-by: Tao Bao <tbao@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
lib/libf2fs_io.c