summaryrefslogtreecommitdiffstats
path: root/tools/net/ynl/ynl-regen.sh
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-06-30 17:41:39 +0200
committerAndrew Morton <akpm@linux-foundation.org>2023-06-30 17:41:39 +0200
commit44f10dbefd5e41b3385af91f855a57aa2afaf40e (patch)
tree944c9f1cda8322691468e6f10dc5b0d41c487621 /tools/net/ynl/ynl-regen.sh
parentMerge branch 'master' into mm-hotfixes-stable (diff)
parentcsky: fix up lock_mm_and_find_vma() conversion (diff)
downloadlinux-44f10dbefd5e41b3385af91f855a57aa2afaf40e.tar.xz
linux-44f10dbefd5e41b3385af91f855a57aa2afaf40e.zip
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'tools/net/ynl/ynl-regen.sh')
-rwxr-xr-xtools/net/ynl/ynl-regen.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/net/ynl/ynl-regen.sh b/tools/net/ynl/ynl-regen.sh
index 74f5de1c2399..8d4ca6a50582 100755
--- a/tools/net/ynl/ynl-regen.sh
+++ b/tools/net/ynl/ynl-regen.sh
@@ -14,11 +14,12 @@ done
KDIR=$(dirname $(dirname $(dirname $(dirname $(realpath $0)))))
-files=$(git grep --files-with-matches '^/\* YNL-GEN \(kernel\|uapi\)')
+files=$(git grep --files-with-matches '^/\* YNL-GEN \(kernel\|uapi\|user\)')
for f in $files; do
# params: 0 1 2 3
# $YAML YNL-GEN kernel $mode
params=( $(git grep -B1 -h '/\* YNL-GEN' $f | sed 's@/\*\(.*\)\*/@\1@') )
+ args=$(sed -n 's@/\* YNL-ARG \(.*\) \*/@\1@p' $f)
if [ $f -nt ${params[0]} -a -z "$force" ]; then
echo -e "\tSKIP $f"
@@ -26,5 +27,6 @@ for f in $files; do
fi
echo -e "\tGEN ${params[2]}\t$f"
- $TOOL --mode ${params[2]} --${params[3]} --spec $KDIR/${params[0]} -o $f
+ $TOOL --mode ${params[2]} --${params[3]} --spec $KDIR/${params[0]} \
+ $args -o $f
done