Skip to content

Commit

Permalink
bin/generate-zbm: require at least one kernel version value
Browse files Browse the repository at this point in the history
Some distributions create generic symlinks to a kernel; such as vmlinuz.old.
These symlinks do not encode any version information in the filename. On ARM
systems, the kernel sometimes does not contain a version that can be detected
via dumping strings from the file. This leads to a case where neither version
string is defined, and the assumption was that one would always be defined.
  • Loading branch information
zdykstra committed Dec 31, 2024
1 parent d9de083 commit 3ee4f29
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/generate-zbm
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,9 @@ sub kernelVersion {
}
}

# Kernel is unusable if no version could be detected
return if ( not nonempty $filever and not nonempty $namever );

# If only one is defined, that's the version
unless ( nonempty $filever ) {
Log("No version found in kernel strings, using $namever from path $kernel");
Expand Down

0 comments on commit 3ee4f29

Please sign in to comment.