diff options
author | John Crispin <blogic@openwrt.org> | 2014-02-26 06:02:07 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-02-26 11:29:29 +0000 |
commit | a086a3ea09c9f2093b44f630312e1916cc43a14a (patch) | |
tree | eaf525083f54d6b6b63403ea2b1fd6116d0f2b1d /kmodloader.c | |
parent | 9ff5685a99dca3036f2ea4c14bdf14f7a2053d9f (diff) | |
download | ubox-a086a3ea09c9f2093b44f630312e1916cc43a14a.tar.gz |
kmodloader: fix insmod when the passed parameter is a valid path
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'kmodloader.c')
-rw-r--r-- | kmodloader.c | 4 |
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; } |