summaryrefslogtreecommitdiff
path: root/tests/bin/modinfo
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bin/modinfo')
-rwxr-xr-xtests/bin/modinfo23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/bin/modinfo b/tests/bin/modinfo
new file mode 100755
index 0000000..14a43bb
--- /dev/null
+++ b/tests/bin/modinfo
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -k)
+ shift
+ kver="$1"
+ ;;
+ -F)
+ shift
+ field="$1"
+ ;;
+ *)
+ if [ -n "$field" ]; then
+ awk -v field="$field:" '$1==field {print $2}' "$1"
+ else
+ cat "$1"
+ fi
+ ;;
+ esac
+ shift
+done
+