diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2023-11-25 22:56:52 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2023-11-28 12:55:52 +0300 |
commit | 8e009dce7c82538119766cc0e3a6c91f3248ea5a (patch) | |
tree | 7870b7eefabf87b27bd3ea18476027f709f8958f /winsup/cygwin/release/3.4.10 | |
parent | 4a7cc5af01e438b33f6544d99548fe5f4d2cb776 (diff) |
Cygwin: posix_fallocate: return ENODEV
The fhandler method ftruncate returns either EISDIR if it has been
called on directories, or EINVAL if called on files other than
regular files. This matches what ftruncate(2) is supposed to return,
but it doesn't match posix_fallocate(3), which is supposed to return
ENODEV in both cases.
To accomplish that, return ENODEV from fhandler_base::ftruncate()
and convert it to EINVAL in ftruncate(2). In posix_fallocate(3),
convert EISDIR to ENODEV.
Fixes: 7636b58590621 ("* autoload.cc (NtSetInformationFile): Define.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/release/3.4.10')
-rw-r--r-- | winsup/cygwin/release/3.4.10 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/release/3.4.10 b/winsup/cygwin/release/3.4.10 index 758a6e071..02f688583 100644 --- a/winsup/cygwin/release/3.4.10 +++ b/winsup/cygwin/release/3.4.10 @@ -18,3 +18,6 @@ Bug Fixes - Align behaviour of rand(3) to ISO C. Adresses: https://cygwin.com/pipermail/cygwin/2023-November/254735.html + +- Fix posix_fallocate(3) return value in case of being called on + other than regular files. |