Bläddra i källkod

ci(droidspaces): simplify pid_namespace.h sed patches

replace the multi-line complex sed commands with a single cleaner script that properly handles the get_pid_ns symbol patching and function body removal, making the CI action script more maintainable.
TheWildJames 4 månader sedan
förälder
incheckning
2a611b7d58
1 ändrade filer med 1 tillägg och 10 borttagningar
  1. 1 10
      .github/actions/droidspaces/action.yml

+ 1 - 10
.github/actions/droidspaces/action.yml

@@ -73,13 +73,4 @@ runs:
       if: inputs.version == 'android12-5.10' || inputs.version == 'android13-5.10'
       working-directory: ${{ github.workspace }}/kernel/common
       run: |
-        sed -i '0,/^[[:space:]]*static inline struct pid_namespace \*get_pid_ns(struct pid_namespace \*ns)[[:space:]]*$/s//extern struct pid_namespace *get_pid_ns(struct pid_namespace *ns);/' include/linux/pid_namespace.h
-        sed -i '0,/^[[:space:]]*extern struct pid_namespace \*get_pid_ns(struct pid_namespace \*ns);[[:space:]]*$/{
-        /^[[:space:]]*extern struct pid_namespace \*get_pid_ns(struct pid_namespace \*ns);[[:space:]]*$/{
-        n
-        :a
-        N
-        /\n[[:space:]]*}[[:space:]]*$/!ba
-        d
-        }
-        }' include/linux/pid_namespace.h
+        sed -i '1,/static.*inline.*get_pid_ns/ { /static.*inline.*get_pid_ns/ { s@.*@extern struct pid_namespace *get_pid_ns(struct pid_namespace *ns);@; n; /^[[:space:]]*{[[:space:]]*$/,/^[[:space:]]*}[[:space:]]*$/d; } }' include/linux/pid_namespace.h