Function pivot_root_in_place

Source
fn pivot_root_in_place(
    vfs: &Arc<VfsManager>,
    new_root_path: &str,
    old_root_path: &str,
) -> Result<(), FileSystemError>
Expand description

Pivot root by replacing the mount tree inside the existing VfsManager

This function implements pivot_root without creating a new VfsManager instance. Instead, it manipulates the mount_tree directly to achieve the same effect. This approach preserves the relationship between the init process and the global VFS.