From 4eb5abbff4e9ddfcb0537bfc75ded89ca739dbfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Wed, 26 Apr 2023 15:20:47 +0100 Subject: uniq: be more specific when diagnosing read errors * src/uniq.c (check_file): Use the errno when diagnosing read errors. --- src/uniq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uniq.c b/src/uniq.c index ad0c1d6ae..9044bde87 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -459,7 +459,7 @@ check_file (char const *infile, char const *outfile, char delimiter) closefiles: if (ferror (stdin) || fclose (stdin) != 0) - die (EXIT_FAILURE, 0, _("error reading %s"), quoteaf (infile)); + die (EXIT_FAILURE, errno, _("error reading %s"), quoteaf (infile)); /* stdout is handled via the atexit-invoked close_stdout function. */ -- cgit v1.2.1