Skip to content

Commit 3e08695

Browse files
mount: clean up mount APIs
Change the Repository::mount() API to return the mounted filesystem as an fd rather than taking the mountpoint as an argument. Create a new mount_at() API to replace the old one, replacing the canicalize() and mount_at() calls that used to be in mount_composefs_at(), which we remove. Update the various users. Making this change lets us simplify the logic in composefs-setup-root: it no longer has to manually open the image in order to perform the fsmount operation: it can use the new API on the repository. This allows us to make Repository::open_image() private, so do that too. Co-authored-by: Sanne Raymaekers <[email protected]> Signed-off-by: Allison Karlitskaya <[email protected]>
1 parent 8051480 commit 3e08695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ async fn main() -> Result<()> {
339339
fs.print_dumpfile()?;
340340
}
341341
Command::Mount { name, mountpoint } => {
342-
repo.mount(&name, &mountpoint)?;
342+
repo.mount_at(&name, &mountpoint)?;
343343
}
344344
Command::ImageObjects { name } => {
345345
let objects = repo.objects_for_image(&name)?;

0 commit comments

Comments
 (0)