Migrate prepare_modules to Rust

This commit is contained in:
topjohnwu
2025-08-05 11:24:55 -07:00
committed by John Wu
parent 959430e030
commit 7961be5cfa
7 changed files with 63 additions and 42 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ pub(crate) fn switch_root(path: &Utf8CStr) {
let res: LoggedResult<()> = try {
debug!("Switch root to {}", path);
let mut mounts = BTreeSet::new();
let mut rootfs = Directory::open(cstr!("/"))?;
let rootfs = Directory::open(cstr!("/"))?;
for info in parse_mount_info("self") {
if info.target == "/" || info.target.as_str() == path.as_str() {
continue;