Skip to content

Commit ce33839

Browse files
committed
boundimage: Use high level deployment_fd helper
This keeps things even simpler, it's the same thing we're doing in `kargs.rs`. Signed-off-by: Colin Walters <[email protected]>
1 parent 4bf7312 commit ce33839

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

lib/src/boundimage.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,9 @@ const BOUND_IMAGE_DIR: &str = "usr/lib/bootc-experimental/bound-images.d";
2020

2121
/// Given a deployment, pull all container images it references.
2222
pub(crate) fn pull_bound_images(sysroot: &SysrootLock, deployment: &Deployment) -> Result<()> {
23-
let sysroot_fd = crate::utils::sysroot_fd(&sysroot);
24-
let sysroot_fd = Dir::reopen_dir(&sysroot_fd)?;
25-
let deployment_root_path = sysroot.deployment_dirpath(&deployment);
26-
let deployment_root = &sysroot_fd.open_dir(&deployment_root_path)?;
27-
28-
let bound_images = parse_spec_dir(&deployment_root, BOUND_IMAGE_DIR)?;
29-
pull_images(deployment_root, bound_images)?;
30-
31-
Ok(())
23+
let deployment_root = &crate::utils::deployment_fd(sysroot, deployment)?;
24+
let bound_images = parse_spec_dir(deployment_root, BOUND_IMAGE_DIR)?;
25+
pull_images(deployment_root, bound_images)
3226
}
3327

3428
#[context("parse bound image spec dir")]

0 commit comments

Comments
 (0)