summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2026-04-02 19:48:45 -0700
committerJosh Poimboeuf <jpoimboe@kernel.org>2026-05-04 21:16:03 -0700
commitb3ece3019e8ebcda5e8451580e34bfbc97ef33e3 (patch)
tree9ffd526393c6fc86cefe7f41d863206ab2d3b55d
parent946d3510fe19dca5cf8c1ea5d5eedff47a72ddc3 (diff)
klp-build: Validate patch file existence
Make sure all patch files actually exist. Otherwise there can be confusing errors later. Acked-by: Song Liu <song@kernel.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
-rwxr-xr-xscripts/livepatch/klp-build5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build
index 68d61b72f39a..13709d20e295 100755
--- a/scripts/livepatch/klp-build
+++ b/scripts/livepatch/klp-build
@@ -157,6 +157,7 @@ process_args() {
local short
local long
local args
+ local patch
short="hfj:o:vdS:T"
long="help,show-first-changed,jobs:,output:,no-replace,verbose,debug,short-circuit:,keep-tmp"
@@ -235,6 +236,10 @@ process_args() {
KEEP_TMP="$keep_tmp"
PATCHES=("$@")
+
+ for patch in "${PATCHES[@]}"; do
+ [[ -f "$patch" ]] || die "$patch doesn't exist"
+ done
}
# temporarily disable xtrace for especially verbose code