| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: I0c5607f7aa5e964abc2031bbe71ff5c6e6ef56cc
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
sparse_file_write_block calls functions that might failed. This patch
makes sparse_file_write_block catch the error code and propagate it.
Without this patch, fastboot crashes on a segmentation fault if
usb_write() fail during a sparse file image flashing.
Change-Id: If9c0e8dfac8fa380628a2504e13abe8cf7d62726
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
|
|
|
|
|
|
| |
Removed unnecessary external/zlib reference from LOCAL_C_INCLUDES
Change-Id: Ib61da00dc1e0eac89a68f244881b12e2a4e92e64
|
|\
| |
| |
| |
| | |
* commit 'd4d096370154492433f02df56a7508eb99f564e2':
libsparse: turn on -Werror
|
| |
| |
| |
| |
| |
| | |
- Deal with some -Wunused issues
Change-Id: I9667d74c0dfbe55c625e65b9d44d7c6f861c455d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
append2simg causes libsparse to write mmapped data from a file
back to that same file. On btrfs, this sometimes causes a page
of zeroes to be written instead of the file data. Work around
the issue by writing the output to a temporary file and then
renaming it over the original file.
Change-Id: Ia194b6ba0ddb8548747b63292b523756f544706a
|
|\ \
| |/
| |
| |
| |
| |
| | |
from C++"
* commit '37d39eba0b3da124be747dd6a014332817135264':
libsparse: allow including from C++
|
| |
| |
| |
| | |
Change-Id: I3788fd07e2b52430a410f85fb79dc886c6a07fea
|
|\ \
| |/
| |
| |
| |
| |
| | |
warning messages"
* commit 'd9f1702a10541b59cfc9582762360d3347712e09':
libsparse: deal with build warning messages
|
| |
| |
| |
| |
| |
| |
| | |
- mostly unused parameters, added defs.h to hold __unused macro
- read_all prototype not included, added output_file.h to acquire
Change-Id: Ib7ee00614acab53a6bd6a64f7e26a8c13dbe6297
|
|\ \
| |/
| |
| | |
Change-Id: I704e3159d529e436e060cb66c1739ef8e7b612d4
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This cleans up most of the size-related problems in system/core.
There are still a few changes needed for a clean 64-bit build,
but they look like they might require changes to things like the
fastboot protocol.
Change-Id: I1560425a289fa158e13e2e3173cc3e71976f92c0
|
|\ \
| |/
| |
| |
| |
| |
| | |
system/core bugs."
* commit '9259663cdb8f15226844e3ecfc6e3aa53614ad03':
Fix a bunch of small system/core bugs.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Missing frees in:
adb/file_sync_client.c
fastboot/fastboot.c
libsparse/output_file.c
Missing closedirs in:
adb/file_sync_service.c
cpio/mkbootfs.c
libcutils/dir_hash.c
Potential buffer overrun in:
gpttool/gpttool.c
Incorrect NULL check in:
libsparse/backed_block.c
Bug: https://code.google.com/p/android/issues/detail?id=61564
Change-Id: If97838a9e73a77aef7f416c31c237ce1fca4ce21
|
|\ \
| |/
| |
| |
| |
| |
| | |
implementation of mmap64()"
* commit '4d5d633bf862dbb0a960019e80fadc40c93177f0':
libsparse: Use BIONIC implementation of mmap64()
|
| |
| |
| |
| |
| | |
Change-Id: I63692629d3a62b7aee21202b67241904b1cc9789
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
|
|/
|
|
|
|
|
|
| |
Append2simg is a small utility designed to glue data to the end
of a sparse image. Beware that it doesn't do anything clever with
that data.
Change-Id: I33af330cb4f77e0842375797a35aebbb6af60163
|
|
|
|
|
|
|
| |
Fix the issue that "out" pointer is dereferenced without checking.
Change-Id: I76a57ad7309841218231346f4807ef2be8628737
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
|
|
|
|
| |
Change-Id: I5006b467978071f9107babe532efa71d05061580
|
|
|
|
|
|
|
| |
last_block * s->block_size can overflow when writing large filesystems,
cast to 64 bits before multiplying.
Change-Id: I3e54097852ce7d0fd271eab53d65e666284898e4
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Fix write_fd_chunk on windows. Uses malloc and read instead of mmap.
Change-Id: I75f10db2e04f19e7f3a6ff46b6978d143cb5254e
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I2f21355b6c5339d1d724b4c121ea30d575b2d366
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Removes static variables in backed_block.c to allow multiple
sparse files to be open at the same time.
Change-Id: I012d8a424c6e21a7352408416adb7c72ee8add21
|
|
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
|