* src/fmt.c (fmt): Pass errno to error() so that
the particular error is diagnosed.
* NEWS: Mention the improvement.
POSIX says this is not portable.
[bug introduced in fileutils-4.1.6]
+ 'fmt' now correctly diagnoses read errors.
+ Previously fmt generated a generic error for any read error.
+ [bug introduced in coreutils-9.0]
+
md5sum --text correctly translates CRLF line endings with the MSYS2 runtime.
This also applies to the sha*sum and b2sum utilities.
[This bug was present in "the beginning".]
if (0 <= err)
{
if (f == stdin)
- error (0, err, _("read error"));
+ error (0, errno, _("read error"));
else
- error (0, err, _("error reading %s"), quoteaf (file));
+ error (0, errno, _("error reading %s"), quoteaf (file));
}
return err < 0;
}