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

Function commit_has_aboot_img

crates/ostree-ext/src/bootabletree.rs:93–104  ·  view source on GitHub ↗

Check if there is an aboot image in the kernel tree dir

(
    root: &gio::File,
    cancellable: Option<&gio::Cancellable>,
)

Source from the content-addressed store, hash-verified

91
92/// Check if there is an aboot image in the kernel tree dir
93pub fn commit_has_aboot_img(
94 root: &gio::File,
95 cancellable: Option<&gio::Cancellable>,
96) -> Result<bool> {
97 if let Some(kernel_dir) = find_kernel_dir(root, cancellable)? {
98 Ok(kernel_dir
99 .resolve_relative_path(ABOOT_IMG)
100 .query_exists(cancellable))
101 } else {
102 Ok(false)
103 }
104}
105
106#[cfg(test)]
107mod test {

Callers 1

install_containerFunction · 0.85

Calls 1

find_kernel_dirFunction · 0.85

Tested by

no test coverage detected