From 2a59c1709df57ab9312a234214a9777e441d8ea0 Mon Sep 17 00:00:00 2001 From: Erik Larson Date: Sun, 2 Feb 2025 14:47:59 -0500 Subject: [PATCH] Use correct arguments for insmod in module_load In the module_load script, the first argument, module, is passed as the an argument to insmod: insmod ./$module.ok $module ... Use shift to drop the first argument and pass the remaining arguments to insmod. --- misc-modules/module_load | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc-modules/module_load b/misc-modules/module_load index a669c5ed6..c9fb9e247 100755 --- a/misc-modules/module_load +++ b/misc-modules/module_load @@ -21,6 +21,9 @@ else group="wheel" fi +# Discard the module name before passing arguments to insmod +shift + echo "Load our module, exit on failure" insmod ./$module.ko $* || exit 1 echo "Get the major number (allocated with allocate_chrdev_region) from /proc/devices"