On 3/9/25 20:22, Pádraig Brady wrote:
On 09/03/2025 17:35, Frédéric Yhuel via GNU coreutils General Discussion
wrote:
Hi,
dd doesn't error out if posix_fadvise() returns an error. Here is a
patch for the fix.
fadvise64() always returns -1 on error, but not posix_fadvise().
Good catch.
The main issue of processing non seekable files was
already diagnosed with other operations related to the "nocache" feature,
OK
but this may diagnose other edge cases.
One of these (very unlikely) cases would be syscall filtering.
For example, using systemd, a configuration like this one:
SystemCallFilter=~fadvise64
SystemCallErrorNumber=EPERM
I've adjusted your patch (attached) to
simplify a bit, always set errno, and add a NEWS entry.
Thanks! FWIW, I have tested your new patch, and it works well (better).