You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "casaroli (via GitHub)" <gi...@apache.org> on 2026/10/17 21:54:58 UTC
[PR] libs/libc/unistd: Set errno when access() denies W_OK. [nuttx]
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] libs/libc/unistd: Set errno when access() denies W_OK. [nuttx]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20753:
URL: https://github.com/apache/nuttx/pull/20753#issuecomment-6241891373
<!-- membrowse-pr-comment -->
## <img src="https://membrowse.com/membrowse-logo.svg" height="24" align="top"> MemBrowse Memory Report
### [qemu-armv8a](https://membrowse.com/public/apache/nuttx/target/qemu-armv8a/compare?head=641a00bb79d5298b17d5b705562f4c77f298c655&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
- **Code**: .text.access +20 B (+0.0%, 348,432 B)
### [qemu-intel64](https://membrowse.com/public/apache/nuttx/target/qemu-intel64/compare?head=641a00bb79d5298b17d5b705562f4c77f298c655&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
- **Code**: .text +17 B (+0.0%, 8,683,471 B)
*No memory changes detected for:*
- [arduino-mega2560](https://membrowse.com/public/apache/nuttx/target/arduino-mega2560/compare?head=641a00bb79d5298b17d5b705562f4c77f298c655&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
- [esp32-devkitc](https://membrowse.com/public/apache/nuttx/target/esp32-devkitc/compare?head=641a00bb79d5298b17d5b705562f4c77f298c655&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
- [hifive1-revb](https://membrowse.com/public/apache/nuttx/target/hifive1-revb/compare?head=641a00bb79d5298b17d5b705562f4c77f298c655&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
- [mirtoo](https://membrowse.com/public/apache/nuttx/target/mirtoo/compare?head=641a00bb79d5298b17d5b705562f4c77f298c655&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
- [rx65n-rsk2mb](https://membrowse.com/public/apache/nuttx/target/rx65n-rsk2mb/compare?head=641a00bb79d5298b17d5b705562f4c77f298c655&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
- [s698pm-dkit](https://membrowse.com/public/apache/nuttx/target/s698pm-dkit/compare?head=641a00bb79d5298b17d5b705562f4c77f298c655&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
- [stm32-nucleo-f103rb](https://membrowse.com/public/apache/nuttx/target/stm32-nucleo-f103rb/compare?head=641a00bb79d5298b17d5b705562f4c77f298c655&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] libs/libc/unistd: Set errno when access() denies W_OK. [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #20753:
URL: https://github.com/apache/nuttx/pull/20753
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org