From: Guido Draheim Date: Mon, 5 Feb 2018 11:21:34 +0000 (+0100) Subject: more DBG for diskopen X-Git-Tag: v0.13.68~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a0e8aa5618a1fff06ffba3e60a3bf1483b7f9b63;p=zziplib more DBG for diskopen --- diff --git a/bins/unzzipcat-mem.c b/bins/unzzipcat-mem.c index 625d936..fde6229 100644 --- a/bins/unzzipcat-mem.c +++ b/bins/unzzipcat-mem.c @@ -98,6 +98,7 @@ static int unzzip_cat (int argc, char ** argv, int extract) disk = zzip_mem_disk_open (argv[1]); if (! disk) { + DBG3("disk_open failed [%i] %s", errno, strerror(errno)); perror(argv[1]); return exitcode(errno); } diff --git a/bins/unzzipcat-mix.c b/bins/unzzipcat-mix.c index 75972b8..84f637b 100644 --- a/bins/unzzipcat-mix.c +++ b/bins/unzzipcat-mix.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "unzzipcat-zip.h" #include "unzzip-states.h" @@ -108,6 +109,7 @@ static int unzzip_cat (int argc, char ** argv, int extract) disk = zzip_opendir (argv[1]); if (! disk) { + DBG3("opendir failed [%i] %s", errno, strerror(errno)); perror(argv[1]); return exitcode(errno); } @@ -123,6 +125,7 @@ static int unzzip_cat (int argc, char ** argv, int extract) unzzip_cat_file (disk, name, out); if (extract) fclose(out); } + DBG2("readdir done %s", strerror(errno)); } else { /* list only the matching entries - in order of zip directory */ diff --git a/bins/unzzipdir-mem.c b/bins/unzzipdir-mem.c index a74bd19..79d6491 100644 --- a/bins/unzzipdir-mem.c +++ b/bins/unzzipdir-mem.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -48,6 +49,7 @@ unzzip_list (int argc, char ** argv, int verbose) disk = zzip_mem_disk_open (argv[1]); if (! disk) { + DBG3("disk_open failed [%i] %s", errno, strerror(errno)); perror(argv[1]); return exitcode(errno); } @@ -55,6 +57,7 @@ unzzip_list (int argc, char ** argv, int verbose) if (argc == 2) { /* list all */ ZZIP_MEM_ENTRY* entry = zzip_mem_disk_findfirst(disk); + DBG2("findfirst %p", entry); for (; entry ; entry = zzip_mem_disk_findnext(disk, entry)) { char* name = zzip_mem_entry_to_name (entry); diff --git a/bins/unzzipdir-mix.c b/bins/unzzipdir-mix.c index 6a3f8cb..3caa481 100644 --- a/bins/unzzipdir-mix.c +++ b/bins/unzzipdir-mix.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -64,7 +65,7 @@ unzzip_list (int argc, char ** argv, int verbose) { int argn; ZZIP_DIR* disk; - + if (argc == 1) { printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); @@ -73,6 +74,7 @@ unzzip_list (int argc, char ** argv, int verbose) disk = zzip_opendir (argv[1]); if (! disk) { + DBG3("opendir failed [%i] %s", errno, strerror(errno)); perror(argv[1]); return exitcode(errno); } @@ -95,6 +97,7 @@ unzzip_list (int argc, char ** argv, int verbose) printf ("%lli/%lli %s %s\n", usize, csize, defl, name); } } + DBG2("readdir done %s", strerror(errno)); } else { /* list only the matching entries - in order of zip directory */ @@ -122,6 +125,7 @@ unzzip_list (int argc, char ** argv, int verbose) } } } + DBG2("readdir done %s", strerror(errno)); } zzip_closedir(disk); return 0;