Skip to content

Commit

Permalink
Do not clobber FEX config if no images were mounted.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
WhatAmISupposedToPutHere authored and alyssarosenzweig committed Oct 16, 2024
1 parent 98e2563 commit a4e2d08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/muvm/src/guest/mount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ fn mount_fex_rootfs() -> Result<()> {
} else if images.len() == 1 {
// Just expose the one mount
symlink(&images[0], &dir_rootfs)?;
} else if images.is_empty() {
// If no images were passed, FEX is either managed by the host os
// or is not installed at all. Avoid clobbering the config in that case.
return Ok(());
}

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

0 comments on commit a4e2d08

Please sign in to comment.