File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,9 @@ const BOUND_IMAGE_DIR: &str = "usr/lib/bootc-experimental/bound-images.d";
20
20
21
21
/// Given a deployment, pull all container images it references.
22
22
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)
32
26
}
33
27
34
28
#[ context( "parse bound image spec dir" ) ]
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ pub(crate) fn sysroot_fd(sysroot: &ostree::Sysroot) -> BorrowedFd {
31
31
32
32
// Return a cap-std `Dir` type for a deployment.
33
33
// TODO: in the future this should perhaps actually mount via composefs
34
- #[ allow( unsafe_code) ]
35
34
pub ( crate ) fn deployment_fd (
36
35
sysroot : & ostree:: Sysroot ,
37
36
deployment : & ostree:: Deployment ,
You can’t perform that action at this time.
0 commit comments