feat: update deps (especially "syscalls")#113
Conversation
There was a problem hiding this comment.
Pull request overview
Updates dependencies (notably switching syscalls to a crates.io release) and adjusts syscall dispatch/availability across architectures.
Changes:
- Bump
arceossubmodule revision. - Switch
syscallsdependency from a git rev toversion = "0.8.1". - Add
cfggating forrenameat/fstatatsyscall handling onriscv64.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| arceos | Updates the submodule commit to pick up upstream changes. |
| api/src/syscall/mod.rs | Adjusts syscall match arms with new architecture cfg gating. |
| api/src/syscall/fs/ctl.rs | Gates sys_renameat on riscv64 to align with syscall availability. |
| api/Cargo.toml | Moves syscalls from a git dependency to a crates.io version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pub fn sys_rename(old_path: *const c_char, new_path: *const c_char) -> AxResult<isize> { | ||
| sys_renameat(AT_FDCWD, old_path, AT_FDCWD, new_path) | ||
| } | ||
|
|
||
| #[cfg(not(target_arch = "riscv64"))] | ||
| pub fn sys_renameat( |
There was a problem hiding this comment.
sys_rename unconditionally calls sys_renameat, but sys_renameat is now behind #[cfg(not(target_arch = \"riscv64\"))]. On riscv64 this will fail to compile because sys_renameat is not defined. Fix by either (a) also gating sys_rename with the same cfg, or (b) providing a riscv64 implementation of sys_renameat (or changing sys_rename to call an always-available function like sys_renameat2).
| Sysno::symlinkat => sys_symlinkat(uctx.arg0() as _, uctx.arg1() as _, uctx.arg2() as _), | ||
| #[cfg(target_arch = "x86_64")] | ||
| Sysno::rename => sys_rename(uctx.arg0() as _, uctx.arg1() as _), | ||
| #[cfg(not(target_arch = "riscv64"))] |
There was a problem hiding this comment.
The riscv64 gating for renameat is now split between the syscall dispatcher (handle_syscall) and the function definition (sys_renameat in fs/ctl.rs). Consider centralizing the architecture availability in one place (e.g., gate the exported syscall functions uniformly, or gate only the dispatch paths) to reduce the risk of mismatched cfgs causing build errors or dead code paths.
| #[cfg(not(target_arch = "riscv64"))] |
No description provided.