From 2fdb3fc0b67757afd6fe7a244b6e14d2a546af0e Mon Sep 17 00:00:00 2001 From: graham.gower Date: Tue, 08 Dec 2009 20:20:03 -0500 Subject: Merge commit 'grg' into HEAD git-svn-id: http://opkg.googlecode.com/svn/trunk@471 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libbb/unarchive.c') diff --git a/libbb/unarchive.c b/libbb/unarchive.c index 31c76d2..03a63bd 100644 --- a/libbb/unarchive.c +++ b/libbb/unarchive.c @@ -185,7 +185,7 @@ extract_archive(FILE *src_stream, FILE *out_stream, goto cleanup; } archive_offset += file_entry->size; - copy_file_chunk(src_stream, dst_stream, file_entry->size); + *err = copy_file_chunk(src_stream, dst_stream, file_entry->size); fclose(dst_stream); } break; @@ -194,7 +194,7 @@ extract_archive(FILE *src_stream, FILE *out_stream, if (mkdir(full_name, file_entry->mode) < 0) { if ((function & extract_quiet) != extract_quiet) { *err = -1; - perror_msg("%s: %s", __FUNCTION__, full_name); + perror_msg("Cannot make dir %s", full_name); } } } @@ -641,7 +641,8 @@ deb_extract(const char *package_filename, FILE *out_stream, else if (extract_function & extract_data_tar_gz) { ared_file = "data.tar.gz"; } else { - fprintf(stderr, "no file specified to extract -- extract_function=%x\n", extract_function); + opkg_msg(ERROR, "Internal error: extract_function=%x\n", + extract_function); *err = -1; goto cleanup; } @@ -668,7 +669,6 @@ deb_extract(const char *package_filename, FILE *out_stream, /* open a stream of decompressed data */ uncompressed_stream = gz_open(deb_stream, &gunzip_pid); if (uncompressed_stream == NULL) { - printf("%s: %d\n", __FUNCTION__, __LINE__); *err = -1; goto cleanup; } -- cgit v0.9.1