Skip to content

Commit a4e2d08

Browse files
Do not clobber FEX config if no images were mounted.
On Asahi Gentoo the FEX rootfs is a part of the host filesystem, and as such the muvm image mount mechanism is not used. Skip overmounting the FEX directory in that case. Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
1 parent 98e2563 commit a4e2d08

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/muvm/src/guest/mount.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ fn mount_fex_rootfs() -> Result<()> {
7474
} else if images.len() == 1 {
7575
// Just expose the one mount
7676
symlink(&images[0], &dir_rootfs)?;
77+
} else if images.is_empty() {
78+
// If no images were passed, FEX is either managed by the host os
79+
// or is not installed at all. Avoid clobbering the config in that case.
80+
return Ok(());
7781
}
7882

7983
// Now we need to tell FEX about this. One of the FEX share directories has an unmounted rootfs

0 commit comments

Comments
 (0)