mirror of
https://github.com/speed47/spectre-meltdown-checker
synced 2025-01-05 10:59:07 +01:00
enh: show kernel version in offline mode
This commit is contained in:
parent
a2dfca671e
commit
5d6102a00e
@ -996,13 +996,15 @@ if [ -z "$vmlinux" ] || [ ! -r "$vmlinux" ]; then
|
|||||||
else
|
else
|
||||||
vmlinux_version=$(strings "$vmlinux" 2>/dev/null | grep '^Linux version ' | head -1)
|
vmlinux_version=$(strings "$vmlinux" 2>/dev/null | grep '^Linux version ' | head -1)
|
||||||
if [ -n "$vmlinux_version" ]; then
|
if [ -n "$vmlinux_version" ]; then
|
||||||
_verbose "Kernel image is \033[35m$vmlinux_version"
|
|
||||||
# in live mode, check if the img we found is the correct one
|
# in live mode, check if the img we found is the correct one
|
||||||
if [ "$opt_live" = 1 ]; then
|
if [ "$opt_live" = 1 ]; then
|
||||||
|
_verbose "Kernel image is \033[35m$vmlinux_version"
|
||||||
if ! echo "$vmlinux_version" | grep -qF "$(uname -r)" || \
|
if ! echo "$vmlinux_version" | grep -qF "$(uname -r)" || \
|
||||||
! echo "$vmlinux_version" | grep -qF "$(uname -v)"; then
|
! echo "$vmlinux_version" | grep -qF "$(uname -v)"; then
|
||||||
_warn "Possible disrepancy between your running kernel and the image we found ($opt_kernel), results might be incorrect"
|
_warn "Possible disrepancy between your running kernel and the image we found ($opt_kernel), results might be incorrect"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
_info "Kernel image is \033[35m$vmlinux_version"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user