Forráskód Böngészése

fix(susfs-patches): fix fdinfo.c fake patch on all android12/13 kernels

Replace the defective sed (which only removed the /* opening of the
IN_ALL_EVENTS comment block, leaving orphaned continuation lines) with
a perl slurp regex that removes the entire multi-line comment at once,
on android12-5.10, android13-5.10, and android13-5.15.
TheWildJames 1 hónapja
szülő
commit
a79ea024a4
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      .github/actions/susfs-patches/action.yml

+ 2 - 2
.github/actions/susfs-patches/action.yml

@@ -34,7 +34,7 @@ runs:
         fi
         if [ "${{ inputs.sublevel }}" -le "117" ]; then
           echo "Applying fdinfo.c Android 12 5.10 Fake Patch"
-          sed -i '/^[[:space:]]*\/\*$\|^[[:space:]]*u32 mask = mark->mask & IN_ALL_EVENTS;$/d' fs/notify/fdinfo.c
+          perl -0777 -i -pe 's{(if \(inode\) \{\n)\t\t \*[^\n]*\n(\t\t \*[^\n]*\n)*\t\t \*/\n}{$1}g; s{^[[:space:]]*u32 mask = mark->mask & IN_ALL_EVENTS;\n}{}m' fs/notify/fdinfo.c
           perl -i -pe 's/\bmask,\s*mark->ignored_mask/inotify_mark_user_mask(mark)/g' fs/notify/fdinfo.c
           perl -i -pe 's/ignored_mask:%x/ignored_mask:0/g' fs/notify/fdinfo.c
         fi
@@ -47,7 +47,7 @@ runs:
         echo "Applying Android 13 5.10 SUSFS fixes"
         if [ "${{ inputs.sublevel }}" -le "107" ]; then
           echo "Applying fdinfo.c Android 13 5.10 Fake Patch"
-          sed -i '/^[[:space:]]*\/\*$\|^[[:space:]]*u32 mask = mark->mask & IN_ALL_EVENTS;$/d' fs/notify/fdinfo.c
+          perl -0777 -i -pe 's{(if \(inode\) \{\n)\t\t \*[^\n]*\n(\t\t \*[^\n]*\n)*\t\t \*/\n}{$1}g; s{^[[:space:]]*u32 mask = mark->mask & IN_ALL_EVENTS;\n}{}m' fs/notify/fdinfo.c
           perl -i -pe 's/\bmask,\s*mark->ignored_mask/inotify_mark_user_mask(mark)/g' fs/notify/fdinfo.c
           perl -i -pe 's/ignored_mask:%x/ignored_mask:0/g' fs/notify/fdinfo.c
         fi