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

fix(susfs-patches): add inotify_mark_user_mask inline for android12/13 5.10

Sublevels ≤117 (android12) and ≤107 (android13) of 5.10 don't have
inotify_mark_user_mask() in the kernel headers — the SUSFS base
patch introduces calls to it but never defines it at those sublevels.
Same pattern as the existing android13-5.15 fix: insert a static inline
definition before inotify_fdinfo() so the function is declared before
use.
TheWildJames 1 hónapja
szülő
commit
e898298e87
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      .github/actions/susfs-patches/action.yml

+ 4 - 0
.github/actions/susfs-patches/action.yml

@@ -37,6 +37,8 @@ runs:
           perl -0777 -i -pe 's{(if \(inode\) \{\n)\t\t/\*\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
+          echo "Adding inotify_mark_user_mask function definition"
+          python3 -c 'import re;c=open("fs/notify/fdinfo.c").read();c=re.sub(r"^static void inotify_fdinfo\(struct seq_file \*m, struct fsnotify_mark \*mark\)$",lambda m:"static inline u32 inotify_mark_user_mask(struct fsnotify_mark *mark)\n{\n\treturn mark->mask & IN_ALL_EVENTS;\n}\n\n"+m.group(0),c,count=1,flags=re.MULTILINE);open("fs/notify/fdinfo.c","w").write(c)'
         fi
 
     - name: Apply Android 13 5.10 Fake Patches
@@ -50,6 +52,8 @@ runs:
           perl -0777 -i -pe 's{(if \(inode\) \{\n)\t\t/\*\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
+          echo "Adding inotify_mark_user_mask function definition"
+          python3 -c 'import re;c=open("fs/notify/fdinfo.c").read();c=re.sub(r"^static void inotify_fdinfo\(struct seq_file \*m, struct fsnotify_mark \*mark\)$",lambda m:"static inline u32 inotify_mark_user_mask(struct fsnotify_mark *mark)\n{\n\treturn mark->mask & IN_ALL_EVENTS;\n}\n\n"+m.group(0),c,count=1,flags=re.MULTILINE);open("fs/notify/fdinfo.c","w").write(c)'
         fi
 
     - name: Apply Android 13 5.15 Fake Patches