From fc9daf8100b2aa84e65ea868ef3b0396f548bd99 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 11 Sep 2003 04:14:31 +0000 Subject: [PATCH] Improved error reports. --- main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.43.0