Skip to content

Commit 2ac7140

Browse files
committed
Improve error message when bootloader config section is not found
1 parent 9a6c884 commit 2ac7140

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: common/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl<'a> Kernel<'a> {
6666
let config = {
6767
let section = kernel_elf
6868
.find_section_by_name(".bootloader-config")
69-
.unwrap();
69+
.expect("bootloader config section not found; kernel must be compiled against bootloader_api");
7070
let raw = section.raw_data(&kernel_elf);
7171
BootloaderConfig::deserialize(raw)
7272
.expect("kernel was compiled with incompatible bootloader_api version")

0 commit comments

Comments
 (0)