MCPcopy Create free account
hub / github.com/bootc-dev/bootc / deployment_fd

Function deployment_fd

crates/lib/src/utils.rs:47–54  ·  view source on GitHub ↗

Return a cap-std `Dir` type for a deployment. TODO: in the future this should perhaps actually mount via composefs

(
    sysroot: &ostree::Sysroot,
    deployment: &ostree::Deployment,
)

Source from the content-addressed store, hash-verified

45// Return a cap-std `Dir` type for a deployment.
46// TODO: in the future this should perhaps actually mount via composefs
47pub(crate) fn deployment_fd(
48 sysroot: &ostree::Sysroot,
49 deployment: &ostree::Deployment,
50) -> Result<Dir> {
51 let sysroot_dir = &Dir::reopen_dir(&sysroot_fd(sysroot))?;
52 let dirpath = sysroot.deployment_dirpath(deployment);
53 sysroot_dir.open_dir(&dirpath).map_err(Into::into)
54}
55
56/// Given an mount option string list like foo,bar=baz,something=else,ro parse it and find
57/// the first entry like $optname=

Callers 6

get_kargsFunction · 0.85
get_ensure_imgstoreMethod · 0.85
reconcile_kargsFunction · 0.85
impl_completionFunction · 0.85

Calls 1

sysroot_fdFunction · 0.70

Tested by

no test coverage detected