diff options
author | Pádraig Brady <P@draigBrady.com> | 2023-04-26 15:20:47 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2023-04-26 16:19:51 +0100 |
commit | 4eb5abbff4e9ddfcb0537bfc75ded89ca739dbfb (patch) | |
tree | 51574766a30d971e6e03b7e1765f746163c9b4a9 | |
parent | b16553cdad35c286a6078b1bfa503df59403be2b (diff) | |
download | coreutils-4eb5abbff4e9ddfcb0537bfc75ded89ca739dbfb.tar.gz |
uniq: be more specific when diagnosing read errors
* src/uniq.c (check_file): Use the errno when diagnosing read errors.
-rw-r--r-- | src/uniq.c | 2 |
1 files changed, 1 insertions, 1 deletions
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. */ |