coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] dd: fix check of return value of posix_fadvise()


From: Frédéric Yhuel
Subject: Re: [PATCH] dd: fix check of return value of posix_fadvise()
Date: Mon, 10 Mar 2025 10:11:16 +0100
User-agent: Mozilla Thunderbird



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).



reply via email to

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