In kdump-lib.sh line 855:
IFS=, read start start_unit end end_unit size <<< \
^--^ SC2162 (info): read without -r will mangle backslashes.
In kdump-lib.sh line 877:
kdump_get_arch_recommend_crashkernel()
^-- SC2120 (warning): kdump_get_arch_recommend_crashkernel references arguments, but
none are ever passed.
In kdump-lib.sh line 920:
_ck_cmdline=$(kdump_get_arch_recommend_crashkernel)
^-- SC2119 (info): Use kdump_get_arch_recommend_crashkernel
"$@" if function's $1 should mean script's $1.
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
kdump-lib.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh
index 9a5320d..9af3204 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -852,7 +852,7 @@ get_recommend_size()
while read -r -d , range; do
# need to use non-default IFS as double spaces are used as a
# single delimiter while commas aren't...
- IFS=, read start start_unit end end_unit size <<< \
+ IFS=, read -r start start_unit end end_unit size <<< \
"$(echo "$range" | sed -n
"s/\([0-9]\+\)\([GT]\?\)-\([0-9]*\)\([GT]\?\):\([0-9]\+[MG]\)/\1,\2,\3,\4,\5/p")"
# aka. 102400T
@@ -874,6 +874,7 @@ get_recommend_size()
# get default crashkernel
# $1 dump mode, if not specified, dump_mode will be judged by is_fadump_capable
+# shellcheck disable=SC2120 # kdumpctl will call this func with an argument
kdump_get_arch_recommend_crashkernel()
{
local _arch _ck_cmdline _dump_mode
--
2.37.1