Skip to content

Commit 6c9a8c2

Browse files
licliucoiby
authored andcommitted
kdumpctl: Fix return value of get_dump_mode_by_kernel
get_dump_mode_by_kernel always be called in a subshell, "exit" doesn't make sense in this case, use return instead. And we should return a non-zero value if there are any error occurs. Signed-off-by: Lichen Liu <[email protected]>
1 parent cd40be6 commit 6c9a8c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kdumpctl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ get_dump_mode_by_kernel()
15001500
echo -n "$_dump_mode"
15011501
else
15021502
derror "failed to get dump mode for kernel $_kernel_path"
1503-
exit
1503+
return 1
15041504
fi
15051505
}
15061506

0 commit comments

Comments
 (0)