X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmodules-load%2Fmodules-load.c;h=c77b092a628b3599a03dca0ff7160ee205a1a888;hb=0b76b4d8c28e8d82422ddeea2cc3c079fe4bb3dc;hp=49b153d411373daf5f549b4c168be52a6db456d5;hpb=059cb3858acd038ff2cef10a3a99119bf71a8fc6;p=elogind.git diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c index 49b153d41..c77b092a6 100644 --- a/src/modules-load/modules-load.c +++ b/src/modules-load/modules-load.c @@ -145,7 +145,7 @@ static int apply_file(struct kmod_ctx *ctx, const char *path, bool ignore_enoent assert(ctx); assert(path); - r = search_and_fopen_nulstr(path, "re", conf_file_dirs, &f); + r = search_and_fopen_nulstr(path, "re", NULL, conf_file_dirs, &f); if (r < 0) { if (ignore_enoent && r == -ENOENT) return 0; @@ -181,15 +181,12 @@ static int apply_file(struct kmod_ctx *ctx, const char *path, bool ignore_enoent return r; } -static int help(void) { - +static void help(void) { printf("%s [OPTIONS...] [CONFIGURATION FILE...]\n\n" "Loads statically configured kernel modules.\n\n" " -h --help Show this help\n" " --version Show package version\n", program_invocation_short_name); - - return 0; } static int parse_argv(int argc, char *argv[]) { @@ -209,12 +206,13 @@ static int parse_argv(int argc, char *argv[]) { assert(argc >= 0); assert(argv); - while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) { + while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) switch (c) { case 'h': - return help(); + help(); + return 0; case ARG_VERSION: puts(PACKAGE_STRING); @@ -227,7 +225,6 @@ static int parse_argv(int argc, char *argv[]) { default: assert_not_reached("Unhandled option"); } - } return 1; }