fix bogus kmodloader warning
authorJohn Crispin <blogic@openwrt.org>
Sun, 12 Jan 2014 13:07:18 +0000 (14:07 +0100)
committerJohn Crispin <blogic@openwrt.org>
Sun, 12 Jan 2014 13:34:20 +0000 (14:34 +0100)
https://dev.openwrt.org/ticket/14659

Signed-off-by: John Crispin <blogic@openwrt.org>
kmodloader.c

index 11af0ae..7840215 100644 (file)
@@ -526,6 +526,11 @@ static int main_insmod(int argc, char **argv)
                cur += sprintf(cur, "%s", argv[i]);
        }
 
+       if (!get_module_path(name)) {
+               fprintf(stderr, "Failed to find %s. Maybe it is a built in module ?\n", name);
+               return -1;
+       }
+
        ret = insert_module(get_module_path(name), options);
        free(options);