From a086a3ea09c9f2093b44f630312e1916cc43a14a Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 26 Feb 2014 06:02:07 +0000 Subject: [PATCH] kmodloader: fix insmod when the passed parameter is a valid path Signed-off-by: John Crispin --- kmodloader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.25.1