summaryrefslogtreecommitdiff
path: root/kmodloader.c
diff options
context:
space:
mode:
Diffstat (limited to 'kmodloader.c')
-rw-r--r--kmodloader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kmodloader.c b/kmodloader.c
index db4574e..770484b 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -540,7 +540,9 @@ static int main_insmod(int argc, char **argv)
cur += sprintf(cur, "%s", argv[i]);
}
- if (!get_module_path(name)) {
+ if (get_module_path(argv[1])) {
+ name = argv[1];
+ } else if (!get_module_path(name)) {
fprintf(stderr, "Failed to find %s. Maybe it is a built in module ?\n", name);
return -1;
}