re-indent
This commit is contained in:
parent
d242e49c89
commit
3b1a74467a
1911
modutils/insmod.c
1911
modutils/insmod.c
File diff suppressed because it is too large
Load Diff
@ -173,12 +173,12 @@ static struct dep_t *build_dep ( void )
|
||||
|
||||
#if defined(CONFIG_FEATURE_2_6_MODULES)
|
||||
if ((k_version > 4) && ( *(col-3) == '.' ) &&
|
||||
( *(col-2) == 'k' ) && ( *(col-1) == 'o' ))
|
||||
( *(col-2) == 'k' ) && ( *(col-1) == 'o' ))
|
||||
ext = 3;
|
||||
else
|
||||
#endif
|
||||
if (( *(col-2) == '.' ) && ( *(col-1) == 'o' ))
|
||||
ext = 2;
|
||||
if (( *(col-2) == '.' ) && ( *(col-1) == 'o' ))
|
||||
ext = 2;
|
||||
|
||||
mod = bb_xstrndup ( mods, col - mods - ext );
|
||||
|
||||
@ -228,12 +228,12 @@ static struct dep_t *build_dep ( void )
|
||||
|
||||
#if defined(CONFIG_FEATURE_2_6_MODULES)
|
||||
if ((k_version > 4) && ( *(end-2) == '.' ) && *(end-1) == 'k' &&
|
||||
( *end == 'o' ))
|
||||
( *end == 'o' ))
|
||||
ext = 3;
|
||||
else
|
||||
#endif
|
||||
if (( *(end-1) == '.' ) && ( *end == 'o' ))
|
||||
ext = 2;
|
||||
if (( *(end-1) == '.' ) && ( *end == 'o' ))
|
||||
ext = 2;
|
||||
|
||||
/* Cope with blank lines */
|
||||
if ((end-deps-ext+1) <= 0)
|
||||
@ -403,12 +403,12 @@ static void check_dep ( char *mod, struct mod_list_t **head, struct mod_list_t *
|
||||
|
||||
#if defined(CONFIG_FEATURE_2_6_MODULES)
|
||||
if ((k_version > 4) && ( mod [lm-3] == '.' ) &&
|
||||
( mod [lm-2] == 'k' ) && ( mod [lm-1] == 'o' ))
|
||||
( mod [lm-2] == 'k' ) && ( mod [lm-1] == 'o' ))
|
||||
mod [lm-3] = 0;
|
||||
else
|
||||
#endif
|
||||
if (( mod [lm-2] == '.' ) && ( mod [lm-1] == 'o' ))
|
||||
mod [lm-2] = 0;
|
||||
if (( mod [lm-2] == '.' ) && ( mod [lm-1] == 'o' ))
|
||||
mod [lm-2] = 0;
|
||||
|
||||
// check dependencies
|
||||
for ( dt = depend; dt; dt = dt-> m_next ) {
|
||||
@ -553,39 +553,39 @@ extern int modprobe_main(int argc, char** argv)
|
||||
|
||||
while ((opt = getopt(argc, argv, "acdklnqrst:vVC:")) != -1) {
|
||||
switch(opt) {
|
||||
case 'c': // no config used
|
||||
case 'l': // no pattern matching
|
||||
return EXIT_SUCCESS;
|
||||
break;
|
||||
case 'C': // no config used
|
||||
case 't': // no pattern matching
|
||||
bb_error_msg_and_die("-t and -C not supported");
|
||||
case 'c': // no config used
|
||||
case 'l': // no pattern matching
|
||||
return EXIT_SUCCESS;
|
||||
break;
|
||||
case 'C': // no config used
|
||||
case 't': // no pattern matching
|
||||
bb_error_msg_and_die("-t and -C not supported");
|
||||
|
||||
case 'a': // ignore
|
||||
case 'd': // ignore
|
||||
break;
|
||||
case 'k':
|
||||
autoclean++;
|
||||
break;
|
||||
case 'n':
|
||||
show_only++;
|
||||
break;
|
||||
case 'q':
|
||||
quiet++;
|
||||
break;
|
||||
case 'r':
|
||||
remove_opt++;
|
||||
break;
|
||||
case 's':
|
||||
do_syslog++;
|
||||
break;
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
case 'V':
|
||||
default:
|
||||
bb_show_usage();
|
||||
break;
|
||||
case 'a': // ignore
|
||||
case 'd': // ignore
|
||||
break;
|
||||
case 'k':
|
||||
autoclean++;
|
||||
break;
|
||||
case 'n':
|
||||
show_only++;
|
||||
break;
|
||||
case 'q':
|
||||
quiet++;
|
||||
break;
|
||||
case 'r':
|
||||
remove_opt++;
|
||||
break;
|
||||
case 's':
|
||||
do_syslog++;
|
||||
break;
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
case 'V':
|
||||
default:
|
||||
bb_show_usage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -598,9 +598,9 @@ extern int modprobe_main(int argc, char** argv)
|
||||
int rc = EXIT_SUCCESS;
|
||||
do {
|
||||
if (mod_remove ( optind < argc ?
|
||||
bb_xstrdup (argv [optind]) : NULL )) {
|
||||
bb_xstrdup (argv [optind]) : NULL )) {
|
||||
bb_error_msg ("failed to remove module %s",
|
||||
argv [optind] );
|
||||
argv [optind] );
|
||||
rc = EXIT_FAILURE;
|
||||
}
|
||||
} while ( ++optind < argc );
|
||||
|
@ -73,7 +73,7 @@ extern int rmmod_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (optind == argc)
|
||||
bb_show_usage();
|
||||
bb_show_usage();
|
||||
|
||||
for (n = optind; n < argc; n++) {
|
||||
if (syscall(__NR_delete_module, argv[n], flags) < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user