History log of /system/core/libsparse/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
83a6d36d4226f82c202ffb27f89e080f95b71c30 01-Apr-2013 Hong-Mei Li <a21834@motorola.com> libsparse: Fix null pointer issue

Fix the issue that "out" pointer is dereferenced without checking.

Change-Id: I76a57ad7309841218231346f4807ef2be8628737
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
utput_file.c
5069b01e21129fe2d42a28e850645376560f2029 24-Jul-2012 Joe Onorato <joeo@google.com> Support for multiple modules with the same name is going away.

Change-Id: I5006b467978071f9107babe532efa71d05061580
ndroid.mk
f1ec8ac84a8540b92a16f187bfa92b2f3c63917e 24-Jul-2012 Colin Cross <ccross@android.com> libsparse: fix 32 bit overflow when calculating last chunk

last_block * s->block_size can overflow when writing large filesystems,
cast to 64 bits before multiplying.

Change-Id: I3e54097852ce7d0fd271eab53d65e666284898e4
parse.c
b43828b247fd4f1e0373584de0504004c69eeac9 09-Jun-2012 Colin Cross <ccross@android.com> libsparse: rename symbols that conflict with libext4_utils

Until ext4_utils switches to using libsparse, libext4_utils defines some
of the same symbols as libsparse. Fastboot links statically against
both of them, and there is no easy way to make the symbols hidden, so
just rename them in libsparse.

Change-Id: Idc2cfe20efe3c3a7fb8233f453a89bbbeb0dcc8b
utput_file.c
utput_file.h
parse.c
317a09e2d47257df5e0972c85f14c2a6ffdbbfd2 25-May-2012 Colin Cross <ccross@android.com> libsparse: add sparse_file_len

Add sparse_file_len, which will compute the size of data that would
be produced if sparse_file_write was called. Useful combined with
sparse_file_callback.

Change-Id: I1a156d1071760f5559483954a5c62ffc20298703
nclude/sparse/sparse.h
parse.c
bdc6d39ed6c09199a5d806f29b71b44cbb27c5c2 03-May-2012 Colin Cross <ccross@android.com> libsparse: add function to resparse a file and a utility to use it

Add sparse_file_repsarse, which splits chunks in an existing sparse
file such that the maximum size of a chunk, plus a header and footer,
is smaller than the given size. This will allow multiple smaller
sparse files to result in the same data as a large sparse file.

Change-Id: I177abdb958a23d5afd394ff265c5b0c6a3ff22fa
ndroid.mk
acked_block.c
acked_block.h
nclude/sparse/sparse.h
img2img.c
img2simg.c
parse.c
parse_defs.h
1e17b313a6257b7b5081e178e81435c09d60378e 22-May-2012 Colin Cross <ccross@android.com> libsparse: add callback output file type

Add a new output file subclass that will call a callback for
each block as it is written. Will be used to measure the space
used by each sparse block to allow resparsing files.

Also add sparse_file_callback, which will write out a sparse
file by calling the provided write function.

Change-Id: I18707bd9c357b68da319cc07982e93d1c2b2bee2
nclude/sparse/sparse.h
utput_file.c
utput_file.h
parse.c
b4cd267db30c152245e6308598e0066d87c5c55d 18-May-2012 Colin Cross <ccross@android.com> libsparse: pseudo-subclass output_file for normal and gz files

Create two subclasses of output_file that can handle normal
and gzipped files, and refactor open_output_fd. Will allow
adding support for an output_file type that is not file
backed.

Change-Id: I26744c74d13f205cf17df1ea9caac1eea9c57357
utput_file.c
utput_file.h
0c4c47f88dfc15cada154a1cf9b4db88b49890f0 26-Apr-2012 Colin Cross <ccross@android.com> libsparse: add sparse_file read and convert tools to use it

Abstract the logic from simg2img into libsparse, and add logic
for reading a regular image into libsparse. simg2img then
becomes a simple wrapper around libsparse.

img2simg was not actually making the file sparse, it was using
sparse files to create multiple files that could be pieced back
together. Replace it with a simple wrapper around libsparse.
Its functionality will be replaced by an simg2simg that can
resparse a file into smaller chunks.

Change-Id: I266f70e1c750454183ce46c71a7bb66bbb033a26
ndroid.mk
mg2simg.c
nclude/sparse/sparse.h
img2img.c
parse_read.c
13a560659381b34ce3edbfa8dbe6c0aa6c076f20 20-Jun-2012 Colin Cross <ccross@android.com> libsparse: fix windows image writing

Fix write_fd_chunk on windows. Uses malloc and read instead of mmap.

Change-Id: I75f10db2e04f19e7f3a6ff46b6978d143cb5254e
utput_file.c
utput_file.h
be8ddcb35a459481c0bcf5bfe645c1fefe963f5c 26-Apr-2012 Colin Cross <ccross@android.com> libsparse: merge adjacent blocks of the same type

When a block is added that is adjacent to another block and of the same
type, merge it. This will be useful for converting regular images to
sparse images, allowing the reader to add a single block at a time and
letting libsparse optimize into larger blocks as it goes.

Does not support merge two blocks that are backed by a data pointer,
only blocks that are backed by a file for now.

Change-Id: I95aa231714cbe01ac194e868c21385806c0bdb97
acked_block.c
acked_block.h
parse.c
a21930b6b0dbb04a52948566d58fb48c6db58bab 26-Apr-2012 Colin Cross <ccross@android.com> libsparse: add error reporting functions

Change-Id: I2f21355b6c5339d1d724b4c121ea30d575b2d366
ndroid.mk
nclude/sparse/sparse.h
parse.c
parse_err.c
parse_file.h
9e1f17e926fa20255c5f4b4d2f68aa98a964253a 26-Apr-2012 Colin Cross <ccross@android.com> libsparse: add support for including fds

Add sparse_file_add_fd to include all or part of the contents
of an fd in the output file. Will be useful for re-sparsing files
where fd will point to the input sparse file.

Change-Id: I5d4ab07fb37231e8e9c1912f62a2968c8b0a00ef
acked_block.c
acked_block.h
nclude/sparse/sparse.h
utput_file.c
utput_file.h
parse.c
b55dceea986ab24f8b836b5116b389ed619c816e 25-Apr-2012 Colin Cross <ccross@android.com> libsparse: cleanups

Move block loops into sparse.c with iterator helpers in backed_block.c.
Simplify chunk writing by moving skip chunk calls from output_file.c to
sparse.c.
Rename variables to be consistent with new naming.
Remove use of u8, u32, u64.

Change-Id: Ic138ad58bef9f96239266ccee12ee83ea285e7eb
acked_block.c
acked_block.h
utput_file.c
utput_file.h
parse.c
parse_crc32.h
411619e921904b896eddae81c086c1f687c8304d 25-Apr-2012 Colin Cross <ccross@android.com> libsparse: remove static variables

Removes static variables in backed_block.c to allow multiple
sparse files to be open at the same time.

Change-Id: I012d8a424c6e21a7352408416adb7c72ee8add21
acked_block.c
acked_block.h
parse.c
parse_file.h
28fa5bc347390480fe190294c6c385b6a9f0d68b 20-May-2012 Colin Cross <ccross@android.com> system/core: move libsparse into system/core

This moves an exact copy of libsparse from
system/extras/ext4_utils/libsparse to system/core/libsparse in
preparation for linking tools in system/core against it.

Change-Id: If664e4fcfd6612844ac745589beb1517e7f9fe58
ndroid.mk
acked_block.c
acked_block.h
mg2simg.c
nclude/sparse/sparse.h
utput_file.c
utput_file.h
img2img.c
img_dump.py
parse.c
parse_crc32.c
parse_crc32.h
parse_defs.h
parse_file.h
parse_format.h