sunfishcode opened PR #4666 from stop-using-notcapable
to main
:
ENOTCAPABLE
was an error code that is used as part of the rights
system, from CloudABI. There is a set of flags associated with each file
descriptor listing which operations can be performed with the file
descriptor, and if an attempt is made to perform an operation with a
file descriptor that isn't permitted by its rights flags, it fails with
ENOTCAPABLE
.WASI is removing the rights system. For example, WebAssembly/wasi-libc#294
removed support for translatingENOTCAPABLE
into POSIX error codes, on
the assumption that engines should stop using it.So as another step to migrating away from the rights system, remove uses
of theENOTCAPABLE
error.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
sunfishcode updated PR #4666 from stop-using-notcapable
to main
.
jameysharp submitted PR review.
jameysharp submitted PR review.
jameysharp created PR review comment:
let err = if missing.intersects(DirCaps::READDIR) { Error::not_dir() } else { Error::perm() }; Err(err.context(format!("desired rights {:?}, has {:?}", caps, self.caps)))
jameysharp created PR review comment:
let err = if missing.intersects(FileCaps::READ | FileCaps::WRITE) { // `EBADF` is a little surprising here because it's also used // for unknown-file-descriptor errors, but it's what POSIX uses // in this situation. Error::badf() } else { Error::perm() }; Err(err.context(format!("desired rights {:?}, has {:?}", caps, self.caps)))
sunfishcode updated PR #4666 from stop-using-notcapable
to main
.
sunfishcode updated PR #4666 from stop-using-notcapable
to main
.
sunfishcode merged PR #4666.
Last updated: Nov 22 2024 at 17:03 UTC