Skip to content

Commit 347a293

Browse files
committed
boundimage: use utils::sysroot_fd
These landed independently; use the shared helper. Signed-off-by: Colin Walters <[email protected]>
1 parent 934cc88 commit 347a293

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/src/boundimage.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,11 @@ use cap_std_ext::dirext::CapStdExtDirExt;
66
use fn_error_context::context;
77
use ostree_ext::ostree::Deployment;
88
use ostree_ext::sysroot::SysrootLock;
9-
use rustix::fd::BorrowedFd;
109

1110
const BOUND_IMAGE_DIR: &str = "usr/lib/bootc-experimental/bound-images.d";
1211

13-
// Access the file descriptor for a sysroot
14-
#[allow(unsafe_code)]
15-
pub(crate) fn sysroot_fd(sysroot: &ostree_ext::ostree::Sysroot) -> BorrowedFd {
16-
unsafe { BorrowedFd::borrow_raw(sysroot.fd()) }
17-
}
18-
1912
pub(crate) fn pull_bound_images(sysroot: &SysrootLock, deployment: &Deployment) -> Result<()> {
20-
let sysroot_fd = sysroot_fd(&sysroot);
13+
let sysroot_fd = crate::utils::sysroot_fd(&sysroot);
2114
let sysroot_fd = Dir::reopen_dir(&sysroot_fd)?;
2215
let deployment_root_path = sysroot.deployment_dirpath(&deployment);
2316
let deployment_root = &sysroot_fd.open_dir(&deployment_root_path)?;

0 commit comments

Comments
 (0)