projects
/
project
/
ubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kmodloader: fix insmod when the passed parameter is a valid path
[project/ubox.git]
/
kmodloader.c
diff --git
a/kmodloader.c
b/kmodloader.c
index
db4574e
..
770484b
100644
(file)
--- a/
kmodloader.c
+++ b/
kmodloader.c
@@
-540,7
+540,9
@@
static int main_insmod(int argc, char **argv)
cur += sprintf(cur, "%s", argv[i]);
}
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;
}
fprintf(stderr, "Failed to find %s. Maybe it is a built in module ?\n", name);
return -1;
}