From: Eric S. Raymond Date: Thu, 11 Sep 2003 04:14:31 +0000 (+0000) Subject: Improved error reports. X-Git-Tag: 1.3~28 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=fc9daf8100b2aa84e65ea868ef3b0396f548bd99;p=comparator.git Improved error reports. --- diff --git a/main.c b/main.c index a94c58a..6907535 100644 --- a/main.c +++ b/main.c @@ -6,6 +6,7 @@ #include #include #include +#include #include "shred.h" int debug = 0; @@ -44,7 +45,7 @@ static int is_scf_file(const char *file) } /* - * We differentiate these two functions in order to avaid the memory + * We differentiate these two functions in order to avoid the memory * overhead of the extra (char *) when assembling shred lists to be written * to a file. This is only worth bothering with because the data sets * can get quite large. @@ -208,7 +209,7 @@ static void merge_tree(char *tree) list = sorted_file_list(tree, &file_count); if (!file_count) { - fprintf(stderr, "comparator: couldn't open %s\n", tree); + fprintf(stderr, "comparator: couldn't open %s, %s\n", tree, strerror(errno)); exit(1); } i = 0;