forked from pool/kdump
- kdump-fix-incorrect-exit-code-checking.patch: Fix incorrect exit
code checking after "local" with assignment (bsc#1184616, LTC#192282) OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=210
This commit is contained in:
parent
fb7f7f7ef8
commit
30291581c7
40
kdump-fix-incorrect-exit-code-checking.patch
Normal file
40
kdump-fix-incorrect-exit-code-checking.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
Author: Petr Tesarik <ptesarik@suse.com>
|
||||||
|
Date: Tue May 25 12:48:08 2021 +0200
|
||||||
|
Subject: Fix incorrect exit code checking after "local" with assignment
|
||||||
|
References: bsc#1184616 LTC#192282
|
||||||
|
Upstream: merged
|
||||||
|
Git-commit: 33abc7c481f62c23727505eafa354253088dae8d
|
||||||
|
|
||||||
|
The "local" keyword cannot be combined with the assignment if the
|
||||||
|
exit status is needed later. The exit status of the whole
|
||||||
|
statement is that of the "local" built-in (always zero),
|
||||||
|
regardless of the the exit status of the assignment.
|
||||||
|
|
||||||
|
Acked-by: Petr Tesarik <ptesarik@suse.com>
|
||||||
|
|
||||||
|
---
|
||||||
|
init/load.sh | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/init/load.sh
|
||||||
|
+++ b/init/load.sh
|
||||||
|
@@ -312,7 +312,8 @@ function load_kdump_fadump()
|
||||||
|
# Find the desired kernel and initrd
|
||||||
|
function find_kernel()
|
||||||
|
{
|
||||||
|
- local output=$($KDUMPTOOL find_kernel)
|
||||||
|
+ local output
|
||||||
|
+ output=$($KDUMPTOOL find_kernel)
|
||||||
|
test $? -eq 0 || return 1
|
||||||
|
|
||||||
|
kdump_kernel=$(echo "$output" | grep ^Kernel | cut -f 2)
|
||||||
|
@@ -325,7 +326,8 @@ function find_kernel()
|
||||||
|
# Rebuild the kdump initramfs if necessary
|
||||||
|
function rebuild_kdumprd()
|
||||||
|
{
|
||||||
|
- local output=$(mkdumprd -K "$kdump_kernel" -I "$kdump_initrd" 2>&1)
|
||||||
|
+ local output
|
||||||
|
+ output=$(mkdumprd -K "$kdump_kernel" -I "$kdump_initrd" 2>&1)
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo "$output"
|
||||||
|
return 1
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 28 09:51:58 UTC 2021 - Petr Tesařík <ptesarik@suse.com>
|
||||||
|
|
||||||
|
- kdump-fix-incorrect-exit-code-checking.patch: Fix incorrect exit
|
||||||
|
code checking after "local" with assignment (bsc#1184616,
|
||||||
|
LTC#192282)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri May 28 09:36:47 UTC 2021 - Petr Tesařík <ptesarik@suse.com>
|
Fri May 28 09:36:47 UTC 2021 - Petr Tesařík <ptesarik@suse.com>
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ Patch10: %{name}-on-error-option-yesno.patch
|
|||||||
Patch11: %{name}-mounts.cc-Include-sys-ioctl.h.patch
|
Patch11: %{name}-mounts.cc-Include-sys-ioctl.h.patch
|
||||||
Patch12: %{name}-Add-bootdev-to-dracut-command-line.patch
|
Patch12: %{name}-Add-bootdev-to-dracut-command-line.patch
|
||||||
Patch13: %{name}-do-not-iterate-past-end-of-string.patch
|
Patch13: %{name}-do-not-iterate-past-end-of-string.patch
|
||||||
|
Patch14: %{name}-fix-incorrect-exit-code-checking.patch
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -95,6 +96,7 @@ after a crash dump has occured.
|
|||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
|
%patch14 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CXXFLAGS="%{optflags} -std=c++11"
|
export CXXFLAGS="%{optflags} -std=c++11"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user