* commit 'a15881a9e9d2951eda7a7a85fbaadd93bfb9da9b': Add verbose param to sparse_file_import_auto
This commit is contained in:
commit
94cd52391c
4 changed files with 6 additions and 5 deletions
|
@ -528,7 +528,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");
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue