bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28432: dd doesn't warn about partial read on final call to iread


From: Pádraig Brady
Subject: bug#28432: dd doesn't warn about partial read on final call to iread
Date: Wed, 13 Sep 2017 18:11:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 12/09/17 08:51, Barry Handelman wrote:
> The iread function in dd.c issues a warning if the previous read was short,
> suggesting that you use iflag=fullblock
> 
> However, the warning is issued when the previous call to iread was partial,
> so if only the final read was short then no warning is issued.
> Importantly, this will always be the case when there was only one read, and
> it was partial.
> 
> I'd suggest that if the strategy of warning on subsequent reads is to be
> used, the warning routine should be run once again after the final read.

The current approach was discussed at https://bugs.gnu.org/7362
A short read as the last read would be a common situation though?
You're specifically looking for the following to warn?

  (echo; sleep 1; echo) | dd count=1 bs=512

That may be a bit aggressive as that could be used to read
the current data available, up to a specified max.

cheers,
Pádraig.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]