Prerequisite for making this configurable. Signed-off-by: Keegan McAllister <keegan@xxxxxxxxxxx> --- modprobe.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modprobe.c b/modprobe.c index 26a7163..cfc6f25 100644 --- a/modprobe.c +++ b/modprobe.c @@ -1814,13 +1814,12 @@ int main(int argc, char *argv[]) if (argc < optind + 1 && !dump_config && !list_only) print_usage(argv[0]); - nofail_asprintf(&dirname, "%s%s/%s", basedir, MODULE_DIR, buf.release); - /* Old-style -t xxx wildcard? Only with -l. */ if (list_only) { if (optind+1 < argc) fatal("Can't have multiple wildcards\n"); /* fprintf(stderr, "man find\n"); return 1; */ + nofail_asprintf(&dirname, "%s%s/%s", basedir, MODULE_DIR, buf.release); failed = do_wildcard(dirname, type, argv[optind]?:"*"); goto out; } @@ -1837,6 +1836,9 @@ int main(int argc, char *argv[]) /* Read module options from kernel command line */ parse_kcmdline(dump_config, &conf.options); + + /* TODO: make MODULE_DIR configurable */ + nofail_asprintf(&dirname, "%s%s/%s", basedir, MODULE_DIR, buf.release); if (dump_config) { char *aliasfilename, *symfilename; -- 1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-modules" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html