Lines Matching refs:patch

34 FIX_PATCH_LINES="$SCRIPT_DIR/fix-patch-lines"
134 -o, --output=<file.ko> Output file [default: livepatch-<patch-name>.ko]
145 5|kmod Build patch module
160 local patch
241 for patch in "${PATCHES[@]}"; do
242 [[ -f "$patch" ]] || die "$patch doesn't exist"
292 # name based on the patch name.
300 NAME="patch"
309 # Hardcode the value printed by the localversion script to prevent patch
329 local patch="$1"
331 grep0 -E '^--- ' "$patch" \
339 local patch="$1"
341 grep0 -E '^\+\+\+ ' "$patch" \
349 local patch="$1"
351 { get_patch_input_files "$patch"; get_patch_output_files "$patch"; } \
356 local patch
358 for patch in "${PATCHES[@]}"; do
361 get_patch_files "$patch" | mapfile -t files
366 die "${patch}: unsupported patch to $file"
374 local patch="$1"
381 [[ ! -f "$patch" ]] && die "$patch doesn't exist"
383 output=$(patch -p1 --dry-run --no-backup-if-mismatch -r /dev/null "${extra_args[@]}" < "$patch" 2>&1) || status=$?
386 die "$patch did not apply"
389 warn "${patch} applied with fuzz"
392 APPLIED_PATCHES+=("$patch")
393 patch -p1 --no-backup-if-mismatch -r /dev/null "${extra_args[@]}" --silent < "$patch"
397 local patch="$1"
400 patch -p1 -R --force --no-backup-if-mismatch -r /dev/null &> /dev/null < "$patch" || true
403 [[ "$p" == "$patch" ]] && continue
412 local patch
414 for patch in "${PATCHES[@]}"; do
415 apply_patch "$patch" "${extra_args[@]}"
459 [[ -x "$FIX_PATCH_LINES" ]] || die "can't find fix-patch-lines"
467 # Refresh the patch hunk headers, specifically the line numbers and counts.
469 local patch="$1"
478 # Get all source files affected by the patch
479 get_patch_input_files "$patch" | mapfile -t input_files
480 get_patch_output_files "$patch" | mapfile -t output_files
486 apply_patch "$patch" "--silent"
488 revert_patch "$patch"
490 # Diff 'a' and 'b' to make a clean patch
491 ( cd "$tmpdir" && diff -Nupr a b > "$patch" ) || true
501 rm -f "$TMP_DIR"/*.patch
506 local tmp_patch="$TMP_DIR/tmp.patch"
507 local patch="${PATCHES[$i]}"
510 new_patch="$TMP_DIR/$idx-fixed-$(basename "$patch")"
541 # When a patch to a kernel module references a newly created unexported
889 status "Validating patch(es)"
902 status "Fixing patch(es)"
929 status "Building patch module: $OUTFILE"