Improved error message on failed module load
authorClifford Wolf <clifford@clifford.at>
Wed, 6 Mar 2013 17:30:45 +0000 (18:30 +0100)
committerClifford Wolf <clifford@clifford.at>
Wed, 6 Mar 2013 17:30:45 +0000 (18:30 +0100)
kernel/driver.cc

index 8ba0283f407b64d71e6aa79115aef08448f8ae12..0da5f68cbe7869d7a84b9a6875464bfb754151df 100644 (file)
@@ -238,7 +238,7 @@ int main(int argc, char **argv)
                case 'm':
                        loaded_modules.push_back(dlopen(optarg, RTLD_LAZY|RTLD_GLOBAL));
                        if (loaded_modules.back() == NULL) {
-                               fprintf(stderr, "Can't load module `%s'!\n", optarg);
+                               fprintf(stderr, "Can't load module `%s': %s\n", optarg, dlerror());
                                exit(1);
                        }
                        break;