Add verbose param to sparse_file_import_auto

Change-Id: I0c5607f7aa5e964abc2031bbe71ff5c6e6ef56cc
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
This commit is contained in:
Mohamad Ayyash 2015-03-31 12:09:29 -07:00
parent b6f38def22
commit 80cc1f6864
4 changed files with 6 additions and 5 deletions

View File

@ -538,7 +538,7 @@ void queue_info_dump(void)
static struct sparse_file **load_sparse_files(int fd, int max_size)
{
struct sparse_file* s = sparse_file_import_auto(fd, false);
struct sparse_file* s = sparse_file_import_auto(fd, false, true);
if (!s) {
die("cannot sparse read file\n");
}

View File

@ -82,7 +82,7 @@ int main(int argc, char *argv[])
exit(-1);
}
sparse_output = sparse_file_import_auto(output, true);
sparse_output = sparse_file_import_auto(output, true, true);
if (!sparse_output) {
fprintf(stderr, "Couldn't import output file\n");
exit(-1);

View File

@ -234,6 +234,7 @@ struct sparse_file *sparse_file_import(int fd, bool verbose, bool crc);
*
* @fd - file descriptor to read from
* @crc - verify the crc of a file in the Android sparse file format
* @verbose - whether to use verbose logging
*
* Reads an existing sparse or normal file into a sparse file cookie.
* Attempts to determine if the file is sparse or not by looking for the sparse
@ -243,7 +244,7 @@ struct sparse_file *sparse_file_import(int fd, bool verbose, bool crc);
*
* Returns a new sparse file cookie on success, NULL on error.
*/
struct sparse_file *sparse_file_import_auto(int fd, bool crc);
struct sparse_file *sparse_file_import_auto(int fd, bool crc, bool verbose);
/** sparse_file_resparse - rechunk an existing sparse file into smaller files
*

View File

@ -472,13 +472,13 @@ struct sparse_file *sparse_file_import(int fd, bool verbose, bool crc)
return s;
}
struct sparse_file *sparse_file_import_auto(int fd, bool crc)
struct sparse_file *sparse_file_import_auto(int fd, bool crc, bool verbose)
{
struct sparse_file *s;
int64_t len;
int ret;
s = sparse_file_import(fd, true, crc);
s = sparse_file_import(fd, verbose, crc);
if (s) {
return s;
}