/usr/src/kernels/4.18.0-553.157.1.el8_10.x86_64/scripts
NameSizeModeActions
basic/-0755rm
clang-tools/-0755rm
coccinelle/-0755rm
dtc/-0755rm
gcc-plugins/-0755rm
gdb/-0755rm
genksyms/-0755rm
kconfig/-0755rm
ksymoops/-0755rm
mod/-0755rm
package/-0755rm
selinux/-0755rm
adjust_autoksyms.sh30100755editdlrm
asn1_compiler280080755editdlrm
asn1_compiler.c363910644editdlrm
bin2c70240755editdlrm
bin2c.c7430644editdlrm
bloat-o-meter33130755editdlrm
bootgraph.pl64260755editdlrm
bpf_doc.py255150755editdlrm
cc-can-link.sh1660755editdlrm
checkincludes.pl19840755editdlrm
checkkconfigsymbols.py158950755editdlrm
checkpatch.pl1971860755editdlrm
checkstack.pl53030755editdlrm
checksyscalls.sh70940755editdlrm
checkversion.pl19380755editdlrm
check_00index.sh13330755editdlrm
check_extable.sh50490755editdlrm
clang-version.sh6350755editdlrm
cleanfile35380755editdlrm
cleanpatch51780755editdlrm
coccicheck74070755editdlrm
config46350755editdlrm
conmakehash116160755editdlrm
conmakehash.c61280644editdlrm
const_structs.checkpatch9640644editdlrm
decodecode25250755editdlrm
decode_stacktrace.sh38340755editdlrm
depmod.sh11190755editdlrm
diffconfig38210755editdlrm
documentation-file-ref-check35480755editdlrm
export_report.pl46540755editdlrm
extract-cert116160755editdlrm
extract-cert.c35410644editdlrm
extract-ikconfig17340755editdlrm
extract-module-sig.pl37420755editdlrm
extract-sys-certs.pl38320755editdlrm
extract-vmlinux17250755editdlrm
extract_xc3028.pl456650755editdlrm
faddr2line63030755editdlrm
file-size.sh860755editdlrm
find-unused-docs.sh13100755editdlrm
gcc-goto.sh5300755editdlrm
gcc-ld7110755editdlrm
gcc-plugin.sh10900755editdlrm
gcc-version.sh8570755editdlrm
gcc-x86_32-has-stack-protector.sh1730755editdlrm
gcc-x86_64-has-stack-protector.sh1980755editdlrm
gen_initramfs_list.sh82240755editdlrm
get_dvb_firmware258240755editdlrm
get_maintainer.pl673690755editdlrm
gfp-translate17520755editdlrm
headerdep.pl35820755editdlrm
headers.sh5120755editdlrm
headers_check.pl38150755editdlrm
headers_install.sh13970755editdlrm
insert-sys-cert.c90840644editdlrm
kallsyms199920755editdlrm
kallsyms.c185800644editdlrm
Kbuild.include154680644editdlrm
Kconfig.include11730644editdlrm
kernel-doc625600755editdlrm
ld-version.sh2690755editdlrm
leaking_addresses.pl131600755editdlrm
Lindent5020755editdlrm
link-vmlinux.sh91760755editdlrm
Makefile17410644editdlrm
Makefile.asm-generic11930644editdlrm
Makefile.build197070644editdlrm
Makefile.clean28830644editdlrm
Makefile.dtbinst11160644editdlrm
Makefile.extrawarn27700644editdlrm
Makefile.gcc-plugins18610644editdlrm
Makefile.headersinst40790644editdlrm
Makefile.host65200644editdlrm
Makefile.kasan16790644editdlrm
Makefile.kcov3190644editdlrm
Makefile.kcsan1180644editdlrm
Makefile.lib155350644editdlrm
Makefile.modbuiltin17170644editdlrm
Makefile.modinst11490644editdlrm
Makefile.modpost54300644editdlrm
Makefile.modsign8970644editdlrm
Makefile.ubsan9510644editdlrm
makelst8080755editdlrm
markup_oops.pl82730755editdlrm
mkcompile_h26280755editdlrm
mkmakefile12180755editdlrm
mksysmap13590755editdlrm
mkuboot.sh4140755editdlrm
module-common.lds9010644editdlrm
modules.order00644editdlrm
namespace.pl133580755editdlrm
objdiff29170755editdlrm
parse-maintainers.pl46460755editdlrm
patch-kernel101850755editdlrm
pnmtologo157200755editdlrm
pnmtologo.c121970644editdlrm
profile2linkerlist.pl4100755editdlrm
prune-kernel7080755editdlrm
recordmcount240080755editdlrm
recordmcount.c170620644editdlrm
recordmcount.h167720644editdlrm
recordmcount.pl187090755editdlrm
setlocalversion40130755editdlrm
show_delta30760755editdlrm
sign-file157680755editdlrm
sign-file.c99940644editdlrm
sortextable157120755editdlrm
sortextable.c104110644editdlrm
sortextable.h56140644editdlrm
spelling.txt256110644editdlrm
sphinx-pre-install143780755editdlrm
split-man.pl6000755editdlrm
stackdelta18830755editdlrm
stackusage7940755editdlrm
subarch.include6410644editdlrm
tags.sh97890755editdlrm
test_fortify.sh22810644editdlrm
unifdef361920755editdlrm
unifdef.c356370644editdlrm
ver_linux27470755editdlrm
xen-hypercalls.sh3860644editdlrm
xz_wrap.sh5620755editdlrm
Edit: /usr/src/kernels/4.18.0-553.157.1.el8_10.x86_64/scripts/cleanpatch (5178B)
#!/usr/bin/perl # SPDX-License-Identifier: GPL-2.0 # # Clean a patch file -- or directory of patch files -- of stealth whitespace. # WARNING: this can be a highly destructive operation. Use with caution. # use warnings; use bytes; use File::Basename; # Default options $max_width = 79; # Clean up space-tab sequences, either by removing spaces or # replacing them with tabs. sub clean_space_tabs($) { no bytes; # Tab alignment depends on characters my($li) = @_; my($lo) = ''; my $pos = 0; my $nsp = 0; my($i, $c); for ($i = 0; $i < length($li); $i++) { $c = substr($li, $i, 1); if ($c eq "\t") { my $npos = ($pos+$nsp+8) & ~7; my $ntab = ($npos >> 3) - ($pos >> 3); $lo .= "\t" x $ntab; $pos = $npos; $nsp = 0; } elsif ($c eq "\n" || $c eq "\r") { $lo .= " " x $nsp; $pos += $nsp; $nsp = 0; $lo .= $c; $pos = 0; } elsif ($c eq " ") { $nsp++; } else { $lo .= " " x $nsp; $pos += $nsp; $nsp = 0; $lo .= $c; $pos++; } } $lo .= " " x $nsp; return $lo; } # Compute the visual width of a string sub strwidth($) { no bytes; # Tab alignment depends on characters my($li) = @_; my($c, $i); my $pos = 0; my $mlen = 0; for ($i = 0; $i < length($li); $i++) { $c = substr($li,$i,1); if ($c eq "\t") { $pos = ($pos+8) & ~7; } elsif ($c eq "\n") { $mlen = $pos if ($pos > $mlen); $pos = 0; } else { $pos++; } } $mlen = $pos if ($pos > $mlen); return $mlen; } $name = basename($0); @files = (); while (defined($a = shift(@ARGV))) { if ($a =~ /^-/) { if ($a eq '-width' || $a eq '-w') { $max_width = shift(@ARGV)+0; } else { print STDERR "Usage: $name [-width #] files...\n"; exit 1; } } else { push(@files, $a); } } foreach $f ( @files ) { print STDERR "$name: $f\n"; if (! -f $f) { print STDERR "$f: not a file\n"; next; } if (!open(FILE, '+<', $f)) { print STDERR "$name: Cannot open file: $f: $!\n"; next; } binmode FILE; # First, verify that it is not a binary file; consider any file # with a zero byte to be a binary file. Is there any better, or # additional, heuristic that should be applied? $is_binary = 0; while (read(FILE, $data, 65536) > 0) { if ($data =~ /\0/) { $is_binary = 1; last; } } if ($is_binary) { print STDERR "$name: $f: binary file\n"; next; } seek(FILE, 0, 0); $in_bytes = 0; $out_bytes = 0; $lineno = 0; @lines = (); $in_hunk = 0; $err = 0; while ( defined($line = ) ) { $lineno++; $in_bytes += length($line); if (!$in_hunk) { if ($line =~ /^\@\@\s+\-([0-9]+),([0-9]+)\s+\+([0-9]+),([0-9]+)\s\@\@/) { $minus_lines = $2; $plus_lines = $4; if ($minus_lines || $plus_lines) { $in_hunk = 1; @hunk_lines = ($line); } } else { push(@lines, $line); $out_bytes += length($line); } } else { # We're in a hunk if ($line =~ /^\+/) { $plus_lines--; $text = substr($line, 1); $text =~ s/[ \t\r]*$//; # Remove trailing spaces $text = clean_space_tabs($text); $l_width = strwidth($text); if ($max_width && $l_width > $max_width) { print STDERR "$f:$lineno: adds line exceeds $max_width ", "characters ($l_width)\n"; } push(@hunk_lines, '+'.$text); } elsif ($line =~ /^\-/) { $minus_lines--; push(@hunk_lines, $line); } elsif ($line =~ /^ /) { $plus_lines--; $minus_lines--; push(@hunk_lines, $line); } else { print STDERR "$name: $f: malformed patch\n"; $err = 1; last; } if ($plus_lines < 0 || $minus_lines < 0) { print STDERR "$name: $f: malformed patch\n"; $err = 1; last; } elsif ($plus_lines == 0 && $minus_lines == 0) { # End of a hunk. Process this hunk. my $i; my $l; my @h = (); my $adj = 0; my $done = 0; for ($i = scalar(@hunk_lines)-1; $i > 0; $i--) { $l = $hunk_lines[$i]; if (!$done && $l eq "+\n") { $adj++; # Skip this line } elsif ($l =~ /^[ +]/) { $done = 1; unshift(@h, $l); } else { unshift(@h, $l); } } $l = $hunk_lines[0]; # Hunk header undef @hunk_lines; # Free memory if ($adj) { die unless ($l =~ /^\@\@\s+\-([0-9]+),([0-9]+)\s+\+([0-9]+),([0-9]+)\s\@\@(.*)$/); my $mstart = $1; my $mlin = $2; my $pstart = $3; my $plin = $4; my $tail = $5; # doesn't include the final newline $l = sprintf("@@ -%d,%d +%d,%d @@%s\n", $mstart, $mlin, $pstart, $plin-$adj, $tail); } unshift(@h, $l); # Transfer to the output array foreach $l (@h) { $out_bytes += length($l); push(@lines, $l); } $in_hunk = 0; } } } if ($in_hunk) { print STDERR "$name: $f: malformed patch\n"; $err = 1; } if (!$err) { if ($in_bytes != $out_bytes) { # Only write to the file if changed seek(FILE, 0, 0); print FILE @lines; if ( !defined($where = tell(FILE)) || !truncate(FILE, $where) ) { die "$name: Failed to truncate modified file: $f: $!\n"; } } } close(FILE); }