tools/coreutils: update to 9.2
[openwrt/staging/jow.git] / tools / coreutils / patches / 002-date-diagnose-f-read-errors.patch
1 From 9c5e542fd190a14431092e3b6cb45d18fe95f26f Mon Sep 17 00:00:00 2001
2 From: Paul Eggert <eggert@cs.ucla.edu>
3 Date: Tue, 28 Mar 2023 01:52:43 -0700
4 Subject: [PATCH] date: diagnose -f read errors
5
6 * src/date.c (batch_convert): Diagnose read errors, fixing Bug#62497.
7 ---
8 --- a/src/date.c
9 +++ b/src/date.c
10 @@ -368,7 +368,9 @@ batch_convert (char const *input_filenam
11 ssize_t line_length = getline (&line, &buflen, in_stream);
12 if (line_length < 0)
13 {
14 - /* FIXME: detect/handle error here. */
15 + if (ferror (in_stream))
16 + die (EXIT_FAILURE, errno, _("%s: read error"),
17 + quotef (input_filename));
18 break;
19 }
20