selftest/kexec: fix "ignored null byte in input" warning
Instead of assigning the string to a variable, which might contain a null character, redirect the output and grep for the string directly. Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
Родитель
92ad19559e
Коммит
cef5cd25a4
|
@ -97,10 +97,11 @@ check_for_imasig()
|
|||
check_for_modsig()
|
||||
{
|
||||
local module_sig_string="~Module signature appended~"
|
||||
local sig="$(tail --bytes $((${#module_sig_string} + 1)) $KERNEL_IMAGE)"
|
||||
local ret=0
|
||||
|
||||
if [ "$sig" == "$module_sig_string" ]; then
|
||||
tail --bytes $((${#module_sig_string} + 1)) $KERNEL_IMAGE | \
|
||||
grep -q "$module_sig_string"
|
||||
if [ $? -eq 0 ]; then
|
||||
ret=1
|
||||
log_info "kexec kernel image modsig signed"
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче