summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fastboot/fastboot.cpp2
-rw-r--r--libsparse/append2simg.c2
-rw-r--r--libsparse/include/sparse/sparse.h3
-rw-r--r--libsparse/sparse_read.c4
4 files changed, 6 insertions, 5 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index 6dc7d345a..e139bcd25 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -538,7 +538,7 @@ void queue_info_dump(void)
538 538
539static struct sparse_file **load_sparse_files(int fd, int max_size) 539static struct sparse_file **load_sparse_files(int fd, int max_size)
540{ 540{
541 struct sparse_file* s = sparse_file_import_auto(fd, false); 541 struct sparse_file* s = sparse_file_import_auto(fd, false, true);
542 if (!s) { 542 if (!s) {
543 die("cannot sparse read file\n"); 543 die("cannot sparse read file\n");
544 } 544 }
diff --git a/libsparse/append2simg.c b/libsparse/append2simg.c
index 65e6cc29b..1cf827cd8 100644
--- a/libsparse/append2simg.c
+++ b/libsparse/append2simg.c
@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
82 exit(-1); 82 exit(-1);
83 } 83 }
84 84
85 sparse_output = sparse_file_import_auto(output, true); 85 sparse_output = sparse_file_import_auto(output, true, true);
86 if (!sparse_output) { 86 if (!sparse_output) {
87 fprintf(stderr, "Couldn't import output file\n"); 87 fprintf(stderr, "Couldn't import output file\n");
88 exit(-1); 88 exit(-1);
diff --git a/libsparse/include/sparse/sparse.h b/libsparse/include/sparse/sparse.h
index 8b757d22a..42d4adb87 100644
--- a/libsparse/include/sparse/sparse.h
+++ b/libsparse/include/sparse/sparse.h
@@ -234,6 +234,7 @@ struct sparse_file *sparse_file_import(int fd, bool verbose, bool crc);
234 * 234 *
235 * @fd - file descriptor to read from 235 * @fd - file descriptor to read from
236 * @crc - verify the crc of a file in the Android sparse file format 236 * @crc - verify the crc of a file in the Android sparse file format
237 * @verbose - whether to use verbose logging
237 * 238 *
238 * Reads an existing sparse or normal file into a sparse file cookie. 239 * Reads an existing sparse or normal file into a sparse file cookie.
239 * Attempts to determine if the file is sparse or not by looking for the sparse 240 * 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);
243 * 244 *
244 * Returns a new sparse file cookie on success, NULL on error. 245 * Returns a new sparse file cookie on success, NULL on error.
245 */ 246 */
246struct sparse_file *sparse_file_import_auto(int fd, bool crc); 247struct sparse_file *sparse_file_import_auto(int fd, bool crc, bool verbose);
247 248
248/** sparse_file_resparse - rechunk an existing sparse file into smaller files 249/** sparse_file_resparse - rechunk an existing sparse file into smaller files
249 * 250 *
diff --git a/libsparse/sparse_read.c b/libsparse/sparse_read.c
index 8e188e9a4..9b10293fe 100644
--- a/libsparse/sparse_read.c
+++ b/libsparse/sparse_read.c
@@ -472,13 +472,13 @@ struct sparse_file *sparse_file_import(int fd, bool verbose, bool crc)
472 return s; 472 return s;
473} 473}
474 474
475struct sparse_file *sparse_file_import_auto(int fd, bool crc) 475struct sparse_file *sparse_file_import_auto(int fd, bool crc, bool verbose)
476{ 476{
477 struct sparse_file *s; 477 struct sparse_file *s;
478 int64_t len; 478 int64_t len;
479 int ret; 479 int ret;
480 480
481 s = sparse_file_import(fd, true, crc); 481 s = sparse_file_import(fd, verbose, crc);
482 if (s) { 482 if (s) {
483 return s; 483 return s;
484 } 484 }