* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//config:config MODPROBE
-//config: bool "modprobe (29 kb)"
+//config: bool "modprobe (28 kb)"
//config: default y
//config: select PLATFORM_LINUX
//config: help
*/
#define MODPROBE_OPTS "alrDb"
/* -a and -D _are_ in fact compatible */
-#define MODPROBE_COMPLEMENTARY ("q-v:v-q:l--arD:r--alD:a--lr:D--rl")
+#define MODPROBE_COMPLEMENTARY "q-v:v-q:l--arD:r--alD:a--lr:D--rl"
//#define MODPROBE_OPTS "acd:lnrt:C:b"
//#define MODPROBE_COMPLEMENTARY "q-v:v-q:l--acr:a--lr:r--al"
enum {
parser_t *p;
struct module_entry *m;
int rc = TRUE;
- const char *base, *ext;
+ const char *base;
/* Skip files that begin with a "." */
base = bb_basename(filename);
* "include FILE_NOT_ENDING_IN_CONF" must work too.
*/
if (depth != 0) {
- ext = strrchr(base, '.');
- if (ext == NULL || strcmp(ext + 1, "conf"))
+ if (!is_suffixed_with(base, ".conf"))
goto error;
}
INIT_G();
- opt_complementary = MODPROBE_COMPLEMENTARY;
- opt = getopt32long(argv, INSMOD_OPTS MODPROBE_OPTS, modprobe_longopts INSMOD_ARGS);
+ opt = getopt32long(argv, "^" INSMOD_OPTS MODPROBE_OPTS "\0" MODPROBE_COMPLEMENTARY,
+ modprobe_longopts
+ INSMOD_ARGS
+ );
argv += optind;
/* Goto modules location */