trae 3 місяців тому
батько
коміт
e5600ffb78
1 змінених файлів з 8 додано та 7 видалено
  1. 8 7
      .github/actions/susfs/action.yml

+ 8 - 7
.github/actions/susfs/action.yml

@@ -161,16 +161,17 @@ runs:
         if [ "${{ inputs.sublevel }}" -le "30" ]; then
           echo "Applying taskmmu.c Android 15 6.6 Fake Patch"
           sed -i '/smap_gather_stats(vma, &mss, last_vma_end);/a\last_vma_end = vma->vm_end;' fs/proc/task_mmu.c
-          perl -0777 -pe '
-          @lines = split /\n/;
-          for (my $i = $#lines; $i >= 0; $i--) {
-              if ($lines[$i] =~ /last_vma_end = vma->vm_end;/) {
-                  $lines[$i] = "\t\t\t\t" . $lines[$i];
+          perl -0777 -i -pe '
+          @l = split /\n/;
+          for ($i = $#l; $i >= 0; $i--) {
+              if ($l[$i] =~ /last_vma_end = vma->vm_end;/) {
+                  $l[$i] = "\t\t\t\t" . $l[$i];
+                  splice(@l, $i + 1, 0, "\t\t\t}\n");
                   last;
               }
           }
-          $_ = join "\n", @lines;
-          ' fs/proc/task_mmu.c > tmp && mv tmp fs/proc/task_mmu.c
+          $_ = join "\n", @l
+          ' fs/proc/task_mmu.c
         fi
         if [ "${{ inputs.sublevel }}" -le "92" ]; then
           echo "Applying base.c Android 15 6.6 Fake Patch"