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 11af0ae7c313023a039c765c64dfeb269c8fb98b..784021588c87ebd1a9b1f292814ee90a907722eb 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);