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,
)
| 45 | // Return a cap-std `Dir` type for a deployment. |
| 46 | // TODO: in the future this should perhaps actually mount via composefs |
| 47 | pub(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= |
no test coverage detected