On 21.12.20 14:49, David Edmondson wrote:
When a call to fcntl(2) for the purpose of manipulating file locks
fails, report the error returned by fcntl.
Signed-off-by: David Edmondson <david.edmond...@oracle.com>
---
block/file-posix.c | 20 +++++-----
tests/qemu-iotests/153.out | 76 +++++++++++++++++++-------------------
tests/qemu-iotests/182.out | 2 +-
3 files changed, 49 insertions(+), 49 deletions(-)
tests/qemu-iotests/296.out also needs to be adjusted (found by grepping
for 'Failed to get').
And now I might as well add this idea: EAGAIN is the most common errno
when flock fcntl fails, so would it make sense to generate a custom
error message then? I’d like to think we could do better than “Resource
temporarily unavailable”, e.g. perhaps “Lock is already taken”.
OTOH, “Resource temporarily unavailable” isn’t *that* bad, so if you
don’t want to, I won’t push for it.
Max