mirror of
https://github.com/sheumann/hush.git
synced 2025-01-18 07:31:34 +00:00
Only pass modprobe module params with 2.6.x kernel support.
-Erik
This commit is contained in:
parent
1f50e84283
commit
e3a792c80c
@ -384,7 +384,7 @@ static int mod_strcmp ( const char *mod_path, const char *mod_name )
|
|||||||
static int already_loaded (const char *name)
|
static int already_loaded (const char *name)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
char buffer[256];
|
char buffer[4096];
|
||||||
|
|
||||||
fd = open ("/proc/modules", O_RDONLY);
|
fd = open ("/proc/modules", O_RDONLY);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
@ -409,7 +409,7 @@ static int already_loaded (const char *name)
|
|||||||
|
|
||||||
static int mod_process ( struct mod_list_t *list, int do_insert )
|
static int mod_process ( struct mod_list_t *list, int do_insert )
|
||||||
{
|
{
|
||||||
char lcmd [256];
|
char lcmd [4096];
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
while ( list ) {
|
while ( list ) {
|
||||||
@ -550,6 +550,7 @@ static int mod_insert ( char *mod, int argc, char **argv )
|
|||||||
check_dep ( mod, &head, &tail );
|
check_dep ( mod, &head, &tail );
|
||||||
|
|
||||||
if ( head && tail ) {
|
if ( head && tail ) {
|
||||||
|
#if defined(CONFIG_FEATURE_2_6_MODULES)
|
||||||
if ( argc ) {
|
if ( argc ) {
|
||||||
int i;
|
int i;
|
||||||
int l = 0;
|
int l = 0;
|
||||||
@ -566,6 +567,7 @@ static int mod_insert ( char *mod, int argc, char **argv )
|
|||||||
strcat ( head-> m_options, " " );
|
strcat ( head-> m_options, " " );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// process tail ---> head
|
// process tail ---> head
|
||||||
rc = mod_process ( tail, 1 );
|
rc = mod_process ( tail, 1 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user