bootstrap: fix redox-scheme API skew (IntoTag path + ref-in-pattern)
base-initfs 'bootstrap' bin failed to compile against current redox-scheme:
- IntoTag is re-exported only from redox_scheme::scheme (top-level path is
private) -> import it from scheme::{...} (fixes E0603 + the E0599 into_tag
not-in-scope at initnsmgr.rs:242).
- Op::OpenAt(ref o) uses an explicit 'ref' inside matches!(&op, ...) which is
now rejected under match ergonomics ('cannot explicitly borrow within an
implicitly-borrowing pattern') -> drop 'ref'.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,9 +18,9 @@ use redox_rt::proc::FdGuard;
|
|||||||
// local/docs/legacy-obsolete-2026-07-25/INITNSMGR-CONCURRENCY-DESIGN.md.
|
// local/docs/legacy-obsolete-2026-07-25/INITNSMGR-CONCURRENCY-DESIGN.md.
|
||||||
use redox_rt::sync::Mutex;
|
use redox_rt::sync::Mutex;
|
||||||
use redox_scheme::{
|
use redox_scheme::{
|
||||||
CallerCtx, Id, IntoTag, OpenResult, RequestKind, Response, SendFdRequest, SignalBehavior,
|
CallerCtx, Id, OpenResult, RequestKind, Response, SendFdRequest, SignalBehavior,
|
||||||
Socket, Tag,
|
Socket, Tag,
|
||||||
scheme::{Op, OpFdPathLike, SchemeState, SchemeSync},
|
scheme::{IntoTag, Op, OpFdPathLike, SchemeState, SchemeSync},
|
||||||
};
|
};
|
||||||
use syscall::Stat;
|
use syscall::Stat;
|
||||||
use syscall::dirent::{DirEntry, DirentBuf, DirentKind};
|
use syscall::dirent::{DirEntry, DirentBuf, DirentKind};
|
||||||
@@ -688,7 +688,7 @@ pub fn run(
|
|||||||
Ok(op) => {
|
Ok(op) => {
|
||||||
let intercept = matches!(
|
let intercept = matches!(
|
||||||
&op,
|
&op,
|
||||||
Op::OpenAt(ref o) if is_scheme_forwarded(o.path())
|
Op::OpenAt(o) if is_scheme_forwarded(o.path())
|
||||||
);
|
);
|
||||||
if intercept {
|
if intercept {
|
||||||
match op {
|
match op {
|
||||||
|
|||||||
Reference in New Issue
Block a user