Skip to content

Commit 5787dcd

Browse files
authored
Merge pull request #1418 from joe-lawrence/shellcheck-oct-2024
tree: fix latest shellcheck complaints
2 parents 3dd3e58 + c799fde commit 5787dcd

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

kpatch-build/kpatch-build

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ if [[ -n "$CONFIG_LIVEPATCH" ]] && (kernel_is_rhel || kernel_version_gte 4.9.0);
11731173
if use_klp_arch; then
11741174
USE_KLP_ARCH=1
11751175
KPATCH_LDFLAGS="--unique=.parainstructions --unique=.altinstructions"
1176-
CDO_FLAGS="--klp-arch"
1176+
CDO_FLAGS+=("--klp-arch")
11771177
fi
11781178

11791179
if [[ "$KLP_REPLACE" -eq 1 ]] ; then
@@ -1427,7 +1427,7 @@ for i in $FILES; do
14271427

14281428
# create-diff-object orig.o patched.o parent-name parent-symtab
14291429
# Module.symvers patch-mod-name output.o
1430-
"$TOOLSDIR"/create-diff-object $CDO_FLAGS "orig/$i" "patched/$i" "$KOBJFILE_NAME" \
1430+
"$TOOLSDIR"/create-diff-object "${CDO_FLAGS[@]}" "orig/$i" "patched/$i" "$KOBJFILE_NAME" \
14311431
"$SYMTAB" "$SYMVERS_FILE" "${MODNAME//-/_}" \
14321432
"output/$i" 2>&1 | logger 1
14331433
check_pipe_status create-diff-object
@@ -1497,7 +1497,7 @@ cd "$TEMPDIR/patch" || die
14971497

14981498
# We no longer need kpatch-cc
14991499
for ((idx=0; idx<${#MAKEVARS[@]}; idx++)); do
1500-
MAKEVARS[$idx]=${MAKEVARS[$idx]/${KPATCH_CC_PREFIX}/}
1500+
MAKEVARS[idx]=${MAKEVARS[idx]/${KPATCH_CC_PREFIX}/}
15011501
done
15021502

15031503
export KPATCH_BUILD="$KERNEL_SRCDIR" KPATCH_NAME="$MODNAME" \
@@ -1510,10 +1510,10 @@ make "${MAKEVARS[@]}" 2>&1 | logger || die
15101510

15111511
if [[ "$USE_KLP" -eq 1 ]]; then
15121512
if [[ "$USE_KLP_ARCH" -eq 0 ]]; then
1513-
extra_flags="--no-klp-arch-sections"
1513+
extra_flags+=("--no-klp-arch-sections")
15141514
fi
15151515
cp -f "$TEMPDIR/patch/$MODNAME.ko" "$TEMPDIR/patch/tmp.ko" || die
1516-
"$TOOLSDIR"/create-klp-module $extra_flags "$TEMPDIR/patch/tmp.ko" "$TEMPDIR/patch/$MODNAME.ko" 2>&1 | logger 1
1516+
"$TOOLSDIR"/create-klp-module "${extra_flags[@]}" "$TEMPDIR/patch/tmp.ko" "$TEMPDIR/patch/$MODNAME.ko" 2>&1 | logger 1
15171517
check_pipe_status create-klp-module
15181518
[[ "$rc" -ne 0 ]] && die "create-klp-module: exited with return code: $rc"
15191519
fi

kpatch/kpatch

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ load_module () {
355355
i=$((i+1))
356356
if [[ $i -eq $MAX_LOAD_ATTEMPTS ]]; then
357357
die "failed to load module $module"
358-
break
359358
else
360359
warn "retrying..."
361360
sleep $RETRY_INTERVAL

test/integration/lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ kpatch_photon_dependencies()
116116
if [[ -z "$flavor" ]]; then
117117
tdnf install -y linux-debuginfo
118118
else
119-
tdnf install -y linux-$flavor-debuginfo
119+
tdnf install -y linux-"$flavor"-debuginfo
120120
fi
121121
}
122122

0 commit comments

Comments
 (0)