From: Pádraig Brady
Date: Wed, 26 Apr 2023 14:20:47 +0000 (+0100) Subject: uniq: be more specific when diagnosing read errors X-Git-Tag: v9.4~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4eb5abbff4e9ddfcb0537bfc75ded89ca739dbfb;p=thirdparty%2Fcoreutils.git uniq: be more specific when diagnosing read errors * src/uniq.c (check_file): Use the errno when diagnosing read errors. --- diff --git a/src/uniq.c b/src/uniq.c index ad0c1d6ae3..9044bde878 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. */