+#!/usr/bin/env bash
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+find_modparams() {
+ FILE="$1"
+ $NM "$FILE" | awk '
+BEGIN {
+ FS=" "
+}
+($3 ~ /^__module_parm_/) && ($3 !~ /^__module_parm_desc/) {
+ gsub(/__module_parm_/, "", $3)
+ printf "-K " $3 " "
+}
+($2 ~ /r/) && ($3 ~ /__param_/) {
+ gsub(/__param_/, "", $3)
+ printf "-K " $3 " "
+}
+'
+}
+