Kaynağa Gözat

fix(susfs-patches): fix fdinfo.c fake patch for android13-5.15 <=41

The old sed removed only the opening /* of the IN_ALL_EVENTS comment
block in inotify_fdinfo, leaving orphaned continuation lines and
closing */ that blocked hunk #4. Replace with a perl slurp-mode regex
that removes the entire multi-line comment block at once.
TheWildJames 1 ay önce
ebeveyn
işleme
b246d9d7cf
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      .github/actions/susfs-patches/action.yml

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

@@ -64,7 +64,7 @@ runs:
           echo "Applying open.c Android 13 5.15 Fake Patch"
           sed -i '/^#include <linux\/compat.h>$/a #include <linux/mnt_idmapping.h>' fs/open.c
           echo "Applying fdinfo.c Android 13 5.15 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