Lines Matching full:patch
36 FIX_PATCH_LINES="$SCRIPT_DIR/fix-patch-lines"
136 -o, --output=<file.ko> Output file [default: livepatch-<patch-name>.ko]
146 4|kmod Build patch module
284 # name based on the patch name.
292 NAME="patch"
301 # Hardcode the value printed by the localversion script to prevent patch
316 local patch="$1"
318 grep0 -E '^--- ' "$patch" \
326 local patch="$1"
328 grep0 -E '^\+\+\+ ' "$patch" \
336 local patch="$1"
338 { get_patch_input_files "$patch"; get_patch_output_files "$patch"; } \
343 local patch
345 for patch in "${PATCHES[@]}"; do
348 get_patch_files "$patch" | mapfile -t files
353 die "${patch}: unsupported patch to $file"
361 local patch="$1"
368 [[ ! -f "$patch" ]] && die "$patch doesn't exist"
370 output=$(patch -d "$SRC" -p1 --dry-run --no-backup-if-mismatch -r /dev/null "${extra_args[@]}" < "$patch" 2>&1) || status=$?
373 die "$patch did not apply"
376 warn "${patch} applied with fuzz"
379 patch -d "$SRC" -p1 --no-backup-if-mismatch -r /dev/null "${extra_args[@]}" --silent < "$patch"
380 APPLIED_PATCHES+=("$patch")
384 local patch="$1"
387 patch -d "$SRC" -p1 -R --silent --no-backup-if-mismatch -r /dev/null < "$patch"
390 [[ "$p" == "$patch" ]] && continue
399 local patch
401 for patch in "${PATCHES[@]}"; do
402 apply_patch "$patch" "${extra_args[@]}"
433 [[ -x "$FIX_PATCH_LINES" ]] || die "can't find fix-patch-lines"
441 # Refresh the patch hunk headers, specifically the line numbers and counts.
443 local patch="$1"
452 # Get all source files affected by the patch
453 get_patch_input_files "$patch" | mapfile -t input_files
454 get_patch_output_files "$patch" | mapfile -t output_files
460 apply_patch "$patch" "--silent"
462 revert_patch "$patch"
464 # Diff 'a' and 'b' to make a clean patch
465 ( cd "$tmpdir" && diff -Nupr a b > "$patch" ) || true
475 rm -f "$TMP_DIR"/*.patch
480 local tmp_patch="$TMP_DIR/tmp.patch"
481 local patch="${PATCHES[$i]}"
484 new_patch="$TMP_DIR/$idx-fixed-$(basename "$patch")"
521 # When a patch to a kernel module references a newly created unexported
818 status "Validating patch(es)"
831 status "Fixing patch(es)"
851 status "Building patch module: $OUTFILE"