mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Change CONFIG_MODPROBE_MULTIPOLE_OPTIONS to
CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS.
This commit is contained in:
parent
762bb626c7
commit
37310ea057
@ -381,7 +381,7 @@ static int already_loaded (const char *name)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_MODPROBE_MULTIPLE_OPTIONS
|
#ifdef CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS
|
||||||
/* static char* parse_command_string( char* src, char **dst );
|
/* static char* parse_command_string( char* src, char **dst );
|
||||||
* src: pointer to string containing argument
|
* src: pointer to string containing argument
|
||||||
* dst: pointer to where to store the parsed argument
|
* dst: pointer to where to store the parsed argument
|
||||||
@ -488,25 +488,25 @@ static char *parse_command_string( char *src, char **dst )
|
|||||||
*tmp_str = '\0';
|
*tmp_str = '\0';
|
||||||
return src;
|
return src;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_MODPROBE_MULTIPLE_OPTIONS */
|
#endif /* CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS */
|
||||||
|
|
||||||
static int mod_process ( struct mod_list_t *list, int do_insert )
|
static int mod_process ( struct mod_list_t *list, int do_insert )
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
#ifdef CONFIG_MODPROBE_MULTIPLE_OPTIONS
|
#ifdef CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS
|
||||||
char **argv = NULL;
|
char **argv = NULL;
|
||||||
char *opts;
|
char *opts;
|
||||||
#ifdef CONFIG_FEATURE_CLEAN_UP
|
#ifdef CONFIG_FEATURE_CLEAN_UP
|
||||||
int argc_malloc;
|
int argc_malloc;
|
||||||
#endif
|
#endif
|
||||||
#else /* CONFIG_MODPROBE_MULTIPLE_OPTIONS */
|
#else /* CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS */
|
||||||
char *argv[10];
|
char *argv[10];
|
||||||
#endif
|
#endif
|
||||||
int argc;
|
int argc;
|
||||||
|
|
||||||
while ( list ) {
|
while ( list ) {
|
||||||
argc = 0;
|
argc = 0;
|
||||||
#ifdef CONFIG_MODPROBE_MULTIPLE_OPTIONS
|
#ifdef CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS
|
||||||
#ifdef CONFIG_FEATURE_CLEAN_UP
|
#ifdef CONFIG_FEATURE_CLEAN_UP
|
||||||
argc_malloc = 0;
|
argc_malloc = 0;
|
||||||
#endif
|
#endif
|
||||||
@ -524,7 +524,7 @@ static int mod_process ( struct mod_list_t *list, int do_insert )
|
|||||||
else if(verbose) /* verbose and quiet are mutually exclusive */
|
else if(verbose) /* verbose and quiet are mutually exclusive */
|
||||||
argv[argc++] = "-v";
|
argv[argc++] = "-v";
|
||||||
argv[argc++] = list-> m_path;
|
argv[argc++] = list-> m_path;
|
||||||
#ifdef CONFIG_MODPROBE_MULTIPLE_OPTIONS
|
#ifdef CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS
|
||||||
#ifdef CONFIG_FEATURE_CLEAN_UP
|
#ifdef CONFIG_FEATURE_CLEAN_UP
|
||||||
argc_malloc = argc;
|
argc_malloc = argc;
|
||||||
#endif
|
#endif
|
||||||
@ -534,10 +534,10 @@ static int mod_process ( struct mod_list_t *list, int do_insert )
|
|||||||
argc++;
|
argc++;
|
||||||
argv = (char**) xrealloc( argv, ( argc + 1 ) * sizeof( char* ) );
|
argv = (char**) xrealloc( argv, ( argc + 1 ) * sizeof( char* ) );
|
||||||
}
|
}
|
||||||
#else /* CONFIG_MODPROBE_MULTIPLE_OPTIONS */
|
#else /* CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS */
|
||||||
if (list-> m_options)
|
if (list-> m_options)
|
||||||
argv[argc++] = list-> m_options;
|
argv[argc++] = list-> m_options;
|
||||||
#endif /* CONFIG_MODPROBE_MULTIPLE_OPTIONS */
|
#endif /* CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS */
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* modutils uses short name for removal */
|
/* modutils uses short name for removal */
|
||||||
@ -546,7 +546,7 @@ static int mod_process ( struct mod_list_t *list, int do_insert )
|
|||||||
if (do_syslog)
|
if (do_syslog)
|
||||||
argv[argc++] = "-s";
|
argv[argc++] = "-s";
|
||||||
argv[argc++] = list->m_name;
|
argv[argc++] = list->m_name;
|
||||||
#if ( defined CONFIG_MODPROBE_MULTIPLE_OPTIONS ) && ( defined CONFIG_FEATURE_CLEAN_UP )
|
#if ( defined CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS ) && ( defined CONFIG_FEATURE_CLEAN_UP )
|
||||||
argc_malloc = argc;
|
argc_malloc = argc;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -589,7 +589,7 @@ static int mod_process ( struct mod_list_t *list, int do_insert )
|
|||||||
rc = 0; /* success if remove any mod */
|
rc = 0; /* success if remove any mod */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if ( defined CONFIG_MODPROBE_MULTIPLE_OPTIONS ) && ( defined CONFIG_FEATURE_CLEAN_UP )
|
#if ( defined CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS ) && ( defined CONFIG_FEATURE_CLEAN_UP )
|
||||||
/* the last value in the array has index == argc, but
|
/* the last value in the array has index == argc, but
|
||||||
* it is the terminatign NULL, so we must not free it. */
|
* it is the terminatign NULL, so we must not free it. */
|
||||||
while( argc_malloc < argc ) {
|
while( argc_malloc < argc ) {
|
||||||
@ -607,7 +607,7 @@ static int mod_process ( struct mod_list_t *list, int do_insert )
|
|||||||
* would not load because there is no more memory, so there's no
|
* would not load because there is no more memory, so there's no
|
||||||
* problem. Hmm, wait... Is this true, whatever the allocation policy? */
|
* problem. Hmm, wait... Is this true, whatever the allocation policy? */
|
||||||
argv = NULL;
|
argv = NULL;
|
||||||
#else /* CONFIG_MODPROBE_MULTIPLE_OPTIONS && CONFIG_FEATURE_CLEAN_UP */
|
#else /* CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS && CONFIG_FEATURE_CLEAN_UP */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
list = do_insert ? list-> m_prev : list-> m_next;
|
list = do_insert ? list-> m_prev : list-> m_next;
|
||||||
|
Loading…
Reference in New Issue
Block a user