16 |
char *filename; |
char *filename; |
17 |
int rc; |
int rc; |
18 |
|
|
19 |
USE_FEATURE_2_4_MODULES( |
/* Compat note: |
20 |
|
* 2.6 style insmod has no options and required filename |
21 |
|
* (not module name - .ko can't be omitted). |
22 |
|
* 2.4 style insmod can take module name without .o |
23 |
|
* and performs module search in default directories |
24 |
|
* or in $MODPATH. |
25 |
|
*/ |
26 |
|
|
27 |
|
IF_FEATURE_2_4_MODULES( |
28 |
getopt32(argv, INSMOD_OPTS INSMOD_ARGS); |
getopt32(argv, INSMOD_OPTS INSMOD_ARGS); |
29 |
argv += optind-1; |
argv += optind - 1; |
30 |
); |
); |
31 |
|
|
32 |
filename = *++argv; |
filename = *++argv; |
35 |
|
|
36 |
rc = bb_init_module(filename, parse_cmdline_module_options(argv)); |
rc = bb_init_module(filename, parse_cmdline_module_options(argv)); |
37 |
if (rc) |
if (rc) |
38 |
bb_error_msg("cannot insert '%s': %s", filename, moderror(rc)); |
bb_error_msg("can't insert '%s': %s", filename, moderror(rc)); |
39 |
|
|
40 |
return rc; |
return rc; |
41 |
} |
} |