mirror of
https://github.com/sheumann/hush.git
synced 2024-10-12 01:24:10 +00:00
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 defined(CONFIG_FEATURE_2_6_MODULES)
|
||||||
if ((k_version > 4) && ( *(col-3) == '.' ) &&
|
if ((k_version > 4) && ( *(col-3) == '.' ) &&
|
||||||
( *(col-2) == 'k' ) && ( *(col-1) == 'o' ))
|
( *(col-2) == 'k' ) && ( *(col-1) == 'o' ))
|
||||||
ext = 3;
|
ext = 3;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (( *(col-2) == '.' ) && ( *(col-1) == 'o' ))
|
if (( *(col-2) == '.' ) && ( *(col-1) == 'o' ))
|
||||||
ext = 2;
|
ext = 2;
|
||||||
|
|
||||||
mod = bb_xstrndup ( mods, col - mods - ext );
|
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 defined(CONFIG_FEATURE_2_6_MODULES)
|
||||||
if ((k_version > 4) && ( *(end-2) == '.' ) && *(end-1) == 'k' &&
|
if ((k_version > 4) && ( *(end-2) == '.' ) && *(end-1) == 'k' &&
|
||||||
( *end == 'o' ))
|
( *end == 'o' ))
|
||||||
ext = 3;
|
ext = 3;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (( *(end-1) == '.' ) && ( *end == 'o' ))
|
if (( *(end-1) == '.' ) && ( *end == 'o' ))
|
||||||
ext = 2;
|
ext = 2;
|
||||||
|
|
||||||
/* Cope with blank lines */
|
/* Cope with blank lines */
|
||||||
if ((end-deps-ext+1) <= 0)
|
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 defined(CONFIG_FEATURE_2_6_MODULES)
|
||||||
if ((k_version > 4) && ( mod [lm-3] == '.' ) &&
|
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;
|
mod [lm-3] = 0;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (( mod [lm-2] == '.' ) && ( mod [lm-1] == 'o' ))
|
if (( mod [lm-2] == '.' ) && ( mod [lm-1] == 'o' ))
|
||||||
mod [lm-2] = 0;
|
mod [lm-2] = 0;
|
||||||
|
|
||||||
// check dependencies
|
// check dependencies
|
||||||
for ( dt = depend; dt; dt = dt-> m_next ) {
|
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) {
|
while ((opt = getopt(argc, argv, "acdklnqrst:vVC:")) != -1) {
|
||||||
switch(opt) {
|
switch(opt) {
|
||||||
case 'c': // no config used
|
case 'c': // no config used
|
||||||
case 'l': // no pattern matching
|
case 'l': // no pattern matching
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
break;
|
break;
|
||||||
case 'C': // no config used
|
case 'C': // no config used
|
||||||
case 't': // no pattern matching
|
case 't': // no pattern matching
|
||||||
bb_error_msg_and_die("-t and -C not supported");
|
bb_error_msg_and_die("-t and -C not supported");
|
||||||
|
|
||||||
case 'a': // ignore
|
case 'a': // ignore
|
||||||
case 'd': // ignore
|
case 'd': // ignore
|
||||||
break;
|
break;
|
||||||
case 'k':
|
case 'k':
|
||||||
autoclean++;
|
autoclean++;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
show_only++;
|
show_only++;
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
quiet++;
|
quiet++;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
remove_opt++;
|
remove_opt++;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
do_syslog++;
|
do_syslog++;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
verbose++;
|
verbose++;
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
default:
|
default:
|
||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -598,9 +598,9 @@ extern int modprobe_main(int argc, char** argv)
|
|||||||
int rc = EXIT_SUCCESS;
|
int rc = EXIT_SUCCESS;
|
||||||
do {
|
do {
|
||||||
if (mod_remove ( optind < argc ?
|
if (mod_remove ( optind < argc ?
|
||||||
bb_xstrdup (argv [optind]) : NULL )) {
|
bb_xstrdup (argv [optind]) : NULL )) {
|
||||||
bb_error_msg ("failed to remove module %s",
|
bb_error_msg ("failed to remove module %s",
|
||||||
argv [optind] );
|
argv [optind] );
|
||||||
rc = EXIT_FAILURE;
|
rc = EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
} while ( ++optind < argc );
|
} while ( ++optind < argc );
|
||||||
|
@ -73,7 +73,7 @@ extern int rmmod_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (optind == argc)
|
if (optind == argc)
|
||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
|
|
||||||
for (n = optind; n < argc; n++) {
|
for (n = optind; n < argc; n++) {
|
||||||
if (syscall(__NR_delete_module, argv[n], flags) < 0) {
|
if (syscall(__NR_delete_module, argv[n], flags) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user