casaroli opened a new pull request, #20753:
URL: https://github.com/apache/nuttx/pull/20753
## Summary
`access()` returned -1 for `W_OK` on a file without a write bit, but it did
not set `errno`. The caller then saw an old `errno` value.
This PR sets `errno` to `EACCES` in this case, as POSIX requires.
## Impact
Only `errno` changes for this one error.
## Testing
A test program on `qemu-armv8a:knsh`: `access("/proc/version", W_OK)`
returns -1 with `errno` 0 on master, and -1 with `EACCES` with this PR.
`ostest` on `qemu-armv8a:knsh` and `qemu-armv8a:nsh` ends with `ostest_main:
Exiting with status 0`. `tools/checkpatch.sh -c -u -m -g` passes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]